File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -405,18 +405,17 @@ func (ts *SSOTestSuite) TestFindSSOProviderByResourceID() {
405405 },
406406 }
407407
408+ getIDs := func (providers []* SSOProvider ) []uuid.UUID {
409+ ids := make ([]uuid.UUID , len (providers ))
410+ for i , p := range providers {
411+ ids [i ] = p .ID
412+ }
413+ return ids
414+ }
415+
408416 check := func (t * testing.T , exp , got []* SSOProvider ) {
409417 t .Helper ()
410-
411- require .Len (t , got , len (exp ))
412-
413- isEqual := func (a , b * SSOProvider ) bool {
414- return a .ID == b .ID && a .ResourceID == b .ResourceID
415- }
416- equal := slices .EqualFunc (exp , got , isEqual )
417- if ! equal {
418- require .Equal (t , exp , got )
419- }
418+ require .ElementsMatch (t , getIDs (exp ), getIDs (got ))
420419 }
421420
422421 for _ , test := range tests {
You can’t perform that action at this time.
0 commit comments