delete all users at the start of each test. (#129)

This commit is contained in:
Jim authored and GitHub committed 2020-06-19 11:27:35 -04:00
1 parent c413e013bd
commit 1974e355c8
1 file changed
+1
+1
View File
@@ -515,6 +515,7 @@ func TestRepository_ListUsers(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
require.NoError(conn.Where("1=1").Delete(allocUser()).Error)
testUsers := []*User{}
for i := 0; i < tt.createCnt; i++ {
testUsers = append(testUsers, TestUser(t, conn, org.PublicId))