From 0dbcd1cd36c2e590f1773b70ae4f896c7bc2dc62 Mon Sep 17 00:00:00 2001 From: KEHyeon Date: Sat, 15 Feb 2025 16:56:29 +0900 Subject: [PATCH] add table on TestCreateWithInterfaceArrayTypeWithTable --- tests/create_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/create_test.go b/tests/create_test.go index 72806068..0521f05e 100644 --- a/tests/create_test.go +++ b/tests/create_test.go @@ -823,12 +823,12 @@ func TestCreateWithInterfaceType(t *testing.T) { } } -func TestCreateWithInterfaceArrayType(t *testing.T) { +func TestCreateWithInterfaceArrayTypeWithTable(t *testing.T) { user := *GetUser("create", Config{}) type UserInterface interface{} var userInterface UserInterface = &user - if results := DB.Create([]UserInterface{userInterface}); results.Error != nil { + if results := DB.Table("users").Create([]UserInterface{userInterface}); results.Error != nil { t.Fatalf("errors happened when create: %v", results.Error) } else if results.RowsAffected != 1 { t.Fatalf("rows affected expects: %v, got %v", 1, results.RowsAffected)