Rewrite test to avoid 6 hours of failures and needing a change every year

This commit is contained in:
Qstick 2022-12-31 18:22:07 -06:00
parent 0e7eaa9221
commit bf78396164

View file

@ -71,12 +71,12 @@ public void should_handle_join_statements(string template, string expected)
result.Should().Be(expected);
}
[TestCase("{{ .Today.Year }}", "2022")]
public void should_handle_variables_statements(string template, string expected)
[TestCase("{{ .Today.Year }}")]
public void should_handle_variables_statements(string template)
{
var result = Subject.ApplyGoTemplateText(template, _variables);
result.Should().Be(expected);
result.Should().Be(DateTime.Now.Year.ToString());
}
[TestCase("{{if .False }}0{{else}}1{{end}}", "1")]