From 2c1fd4648bdb2a2d9da7e70936f780f9e97c5b4b Mon Sep 17 00:00:00 2001 From: SimoneDutto Date: Mon, 16 Dec 2024 11:35:48 +0100 Subject: [PATCH] chagne test --- internal/dbmodel/group_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/dbmodel/group_test.go b/internal/dbmodel/group_test.go index 99dd90ec1..082b744f5 100644 --- a/internal/dbmodel/group_test.go +++ b/internal/dbmodel/group_test.go @@ -37,7 +37,7 @@ func TestGroupEntry(t *testing.T) { c.Assert(ge3, qt.DeepEquals, ge) } -// test we hard delete groups +// test we hard delete groups, so when we can recreate the group with the same name after deleting it. func TestHardDeleteGroupEntry(t *testing.T) { c := qt.New(t) db := gormDB(t) @@ -52,4 +52,9 @@ func TestHardDeleteGroupEntry(t *testing.T) { result := db.First(&ge) c.Assert(result.Error, qt.ErrorMatches, "record not found") + + ge1 := dbmodel.GroupEntry{ + Name: "test-group-1", + } + c.Assert(db.Create(&ge1).Error, qt.IsNil) }