github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/kit/sqlx/builder/builder_z_assignment_test.go (about) 1 package builder_test 2 3 import ( 4 "context" 5 "testing" 6 7 g "github.com/onsi/gomega" 8 9 . "github.com/machinefi/w3bstream/pkg/depends/kit/sqlx/builder" 10 . "github.com/machinefi/w3bstream/pkg/depends/testutil/buildertestutil" 11 ) 12 13 func TestAssignment(t *testing.T) { 14 t.Run("ColumnsAndValues", func(t *testing.T) { 15 g.NewWithT(t).Expect( 16 ColumnsAndValues(Cols("a", "b"), 1, 2, 3, 4). 17 Ex(ContextWithToggleUseValues(context.Background(), true)), 18 ).To(BeExpr("(a,b) VALUES (?,?),(?,?)", 1, 2, 3, 4)) 19 }) 20 }