Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,24 @@ public void QueryAndFragmentWithLinkText()
writer.ToString().ShouldBe(@"<a href=""/a/b/c?abc=123#xyz"">Foo</a>");
}
}

[Test]
public void LinkFromMarkdown()
{
// Given
TestDocument document = new TestDocument(new NormalizedPath("a/b/c"));
IHtmlHelper htmlHelper = new TestHtmlHelper();

// When
IHtmlContent result = htmlHelper.DocumentLink(document, "abc=123&amp;xyz=456", "Foo");

// Then
using (StringWriter writer = new StringWriter())
{
result.WriteTo(writer, HtmlEncoder.Default);
writer.ToString().ShouldBe(@"<a href=""/a/b/c?abc=123&amp;xyz=456"">Foo</a>");
}
}
}

public class CachedPartialTests : IHtmlHelperExtensionsFixture
Expand Down