mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
parent
202510fdc9
commit
0462c96a5a
3 changed files with 25 additions and 0 deletions
|
@ -221,3 +221,12 @@ func TestTimeUnix(t *testing.T) {
|
|||
toTimeUnix(iv)
|
||||
}(t)
|
||||
}
|
||||
|
||||
func TestConditional(t *testing.T) {
|
||||
assert := require.New(t)
|
||||
n := New()
|
||||
a, b := "a", "b"
|
||||
|
||||
assert.Equal(a, n.Conditional(true, a, b))
|
||||
assert.Equal(b, n.Conditional(false, a, b))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue