File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -167,3 +167,21 @@ func TestLinkedRepository(t *testing.T) {
167
167
})
168
168
}
169
169
}
170
+
171
+ func TestRepoAssignees (t * testing.T ) {
172
+ assert .NoError (t , unittest .PrepareTestDatabase ())
173
+
174
+ repo2 := unittest .AssertExistsAndLoadBean (t , & repo_model.Repository {ID : 2 }).(* repo_model.Repository )
175
+ users , err := GetRepoAssignees (repo2 )
176
+ assert .NoError (t , err )
177
+ assert .Len (t , users , 1 )
178
+ assert .Equal (t , users [0 ].ID , int64 (2 ))
179
+
180
+ repo21 := unittest .AssertExistsAndLoadBean (t , & repo_model.Repository {ID : 21 }).(* repo_model.Repository )
181
+ users , err = GetRepoAssignees (repo21 )
182
+ assert .NoError (t , err )
183
+ assert .Len (t , users , 3 )
184
+ assert .Equal (t , users [0 ].ID , int64 (15 ))
185
+ assert .Equal (t , users [1 ].ID , int64 (18 ))
186
+ assert .Equal (t , users [2 ].ID , int64 (16 ))
187
+ }
You can’t perform that action at this time.
0 commit comments