@@ -15,7 +15,7 @@ func (suite *MethodTestSuite) TestGroup() {
15
15
suite .Run ("DeleteGroupByID" , func () {
16
16
suite .RunMethodTest (func (t * testing.T , db database.Store ) MethodCase {
17
17
g := dbgen .Group (t , db , database.Group {})
18
- return methodCase (values (g .ID ), asserts (g , rbac .ActionDelete ))
18
+ return methodCase (values (g .ID ), asserts (g , rbac .ActionDelete ), values () )
19
19
})
20
20
})
21
21
suite .Run ("DeleteGroupMemberFromGroup" , func () {
@@ -27,13 +27,13 @@ func (suite *MethodTestSuite) TestGroup() {
27
27
return methodCase (values (database.DeleteGroupMemberFromGroupParams {
28
28
UserID : m .UserID ,
29
29
GroupID : g .ID ,
30
- }), asserts (g , rbac .ActionUpdate ))
30
+ }), asserts (g , rbac .ActionUpdate ), values () )
31
31
})
32
32
})
33
33
suite .Run ("GetGroupByID" , func () {
34
34
suite .RunMethodTest (func (t * testing.T , db database.Store ) MethodCase {
35
35
g := dbgen .Group (t , db , database.Group {})
36
- return methodCase (values (g .ID ), asserts (g , rbac .ActionRead ))
36
+ return methodCase (values (g .ID ), asserts (g , rbac .ActionRead ), values ( g ) )
37
37
})
38
38
})
39
39
suite .Run ("GetGroupByOrgAndName" , func () {
@@ -42,20 +42,20 @@ func (suite *MethodTestSuite) TestGroup() {
42
42
return methodCase (values (database.GetGroupByOrgAndNameParams {
43
43
OrganizationID : g .OrganizationID ,
44
44
Name : g .Name ,
45
- }), asserts (g , rbac .ActionRead ))
45
+ }), asserts (g , rbac .ActionRead ), values ( g ) )
46
46
})
47
47
})
48
48
suite .Run ("GetGroupMembers" , func () {
49
49
suite .RunMethodTest (func (t * testing.T , db database.Store ) MethodCase {
50
50
g := dbgen .Group (t , db , database.Group {})
51
- _ = dbgen .GroupMember (t , db , database.GroupMember {})
52
- return methodCase (values (g .ID ), asserts (g , rbac .ActionRead ))
51
+ gm : = dbgen .GroupMember (t , db , database.GroupMember {})
52
+ return methodCase (values (g .ID ), asserts (g , rbac .ActionRead ), values ( gm ) )
53
53
})
54
54
})
55
55
suite .Run ("InsertAllUsersGroup" , func () {
56
56
suite .RunMethodTest (func (t * testing.T , db database.Store ) MethodCase {
57
57
o := dbgen .Organization (t , db , database.Organization {})
58
- return methodCase (values (o .ID ), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionCreate ))
58
+ return methodCase (values (o .ID ), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionCreate ), values (database. Group {}) )
59
59
})
60
60
})
61
61
suite .Run ("InsertGroup" , func () {
@@ -64,7 +64,8 @@ func (suite *MethodTestSuite) TestGroup() {
64
64
return methodCase (values (database.InsertGroupParams {
65
65
OrganizationID : o .ID ,
66
66
Name : "test" ,
67
- }), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionCreate ))
67
+ }), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionCreate ),
68
+ values (database.Group {}))
68
69
})
69
70
})
70
71
suite .Run ("InsertGroupMember" , func () {
@@ -73,7 +74,8 @@ func (suite *MethodTestSuite) TestGroup() {
73
74
return methodCase (values (database.InsertGroupMemberParams {
74
75
UserID : uuid .New (),
75
76
GroupID : g .ID ,
76
- }), asserts (g , rbac .ActionUpdate ))
77
+ }), asserts (g , rbac .ActionUpdate ),
78
+ values ())
77
79
})
78
80
})
79
81
suite .Run ("InsertUserGroupsByName" , func () {
@@ -87,7 +89,7 @@ func (suite *MethodTestSuite) TestGroup() {
87
89
OrganizationID : o .ID ,
88
90
UserID : u1 .ID ,
89
91
GroupNames : slice .New (g1 .Name , g2 .Name ),
90
- }), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionUpdate ))
92
+ }), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionUpdate ), values () )
91
93
})
92
94
})
93
95
suite .Run ("DeleteGroupMembersByOrgAndUser" , func () {
@@ -101,7 +103,7 @@ func (suite *MethodTestSuite) TestGroup() {
101
103
return methodCase (values (database.DeleteGroupMembersByOrgAndUserParams {
102
104
OrganizationID : o .ID ,
103
105
UserID : u1 .ID ,
104
- }), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionUpdate ))
106
+ }), asserts (rbac .ResourceGroup .InOrg (o .ID ), rbac .ActionUpdate ), values () )
105
107
})
106
108
})
107
109
suite .Run ("UpdateGroupByID" , func () {
@@ -110,7 +112,7 @@ func (suite *MethodTestSuite) TestGroup() {
110
112
return methodCase (values (database.UpdateGroupByIDParams {
111
113
Name : "new-name" ,
112
114
ID : g .ID ,
113
- }), asserts (g , rbac .ActionUpdate ))
115
+ }), asserts (g , rbac .ActionUpdate ), values ( g ) )
114
116
})
115
117
})
116
118
}
0 commit comments