public void Begin_form_without_enctype() { var t = new DefaultFormTemplate(); var result = t.BeginForm("/", FormMethod.Post, null, null); HtmlApprovals.VerifyHtml(result.ToHtmlString()); }
public void Begin_form_with_enctype() { var t = new DefaultFormTemplate(); var result = t.BeginForm("/", FormMethod.Post, new HtmlAttributes(data_attr => "value"), EncType.Multipart); HtmlApprovals.VerifyHtml(result.ToHtmlString()); }
public void Construct_form_via_extension_method() { var t = new DefaultFormTemplate(); var f2 = _h.BeginChameleonForm(Action, Method, new HtmlAttributes(), Enctype); Assert.That(f2, Is.Not.Null); _h.ViewContext.Writer.Received().Write(Arg.Is <IHtmlString>(h => h.ToHtmlString() == t.BeginForm(Action, Method, _htmlAttributes, Enctype).ToHtmlString())); }