public void Should_Render_Hidden_Submit_Button() { IHtmlString button = new HtmlHelper(new ViewContext(), new ViewPage()).HiddenSubmit(); string html = button.ToHtmlString().Trim(); Assert.IsTrue(html.StartsWith("<input ")); Assert.IsTrue(html.EndsWith("/>")); Assert.IsTrue(html.Contains("display:none") || html.Contains("display: none")); }
public void Should_Render_Hidden_Submit_Button() { IHtmlString button = new HtmlHelper(new ViewContext(), new ViewPage()).HiddenSubmit(); string html = button.ToHtmlString().Trim(); Assert.IsTrue(html.StartsWith("<input ")); Assert.IsTrue(html.EndsWith("/>", System.StringComparison.Ordinal)); Assert.IsTrue(html.Contains("position:absolute; left:-999em; top:-999em;") || html.Contains("position: absolute; left: -999em; top: -999em;")); }