github.com/MontFerret/ferret@v0.18.0/pkg/stdlib/datetime/now_test.go (about) 1 package datetime_test 2 3 import ( 4 "testing" 5 6 "github.com/MontFerret/ferret/pkg/stdlib/datetime" 7 8 "github.com/MontFerret/ferret/pkg/runtime/core" 9 "github.com/MontFerret/ferret/pkg/runtime/values" 10 ) 11 12 func TestNow(t *testing.T) { 13 tcs := []*testCase{ 14 &testCase{ 15 Name: "When too many arguments", 16 Expected: values.None, 17 Args: []core.Value{ 18 values.NewCurrentDateTime(), 19 }, 20 ShouldErr: true, 21 }, 22 } 23 24 for _, tc := range tcs { 25 tc.Do(t, datetime.Now) 26 } 27 }