-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
This SSVE markup:
@Context.ViewBag.HaveMessage;<br />
@If.Context.ViewBag.HaveMessage;
Yay Message!
@EndIf;
Produces in Nancy:
True
Produces in SSVE test:
True
Yay Message!
[Fact]
public void Should_evaluate_context_conditional()
{
const string input = @"@Context.ViewBag.HaveMessage;! @If.Context.ViewBag.HaveMessage;Yay message!@EndIf;";
var context = new { ViewBag = (dynamic)new ExpandoObject() };
context.ViewBag.HaveMessage = true;
((FakeViewEngineHost)this.fakeHost).Context = context;
var output = viewEngine.Render(input, null, this.fakeHost);
Assert.Equal(@"True! Yay message!", output);
}
Metadata
Metadata
Assignees
Labels
No labels