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

pull/131/head^2
Jim 6 years ago committed by GitHub
parent c413e013bd
commit 1974e355c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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))

Loading…
Cancel
Save