public void ToString_should_render_label() { string expected = "<input id=\"foo\" type=\"checkbox\"/><label for=\"foo\">Bar</label>"; var field = new CheckBoxField(new Hash(id => "foo", label => "Bar")); string html = field.ToString(); Assert.That(html, Is.EqualTo(expected)); }
public void ToString_should_not_render_label_with_no_id() { string expected = "<input type=\"checkbox\"/>"; var field = new CheckBoxField(new Hash(label => "Bar")); string html = field.ToString(); Assert.That(html, Is.EqualTo(expected)); }