@@ -45,6 +45,16 @@ public ClientTests(ClientTestsFixture fixture)
45
45
public async Task Test_client_crud_sequence ( )
46
46
{
47
47
string existingOrganizationId = "org_V6ojENVd1ERs5YY1" ;
48
+ var selectedInitiators = new [ ]
49
+ {
50
+ LogoutInitiators . RpLogout ,
51
+ LogoutInitiators . IdpLogout ,
52
+ LogoutInitiators . PasswordChanged ,
53
+ LogoutInitiators . SessionRevoked ,
54
+ LogoutInitiators . AccountDeleted ,
55
+ LogoutInitiators . EmailIdentifierChanged
56
+ } ;
57
+
48
58
// Add a new client
49
59
var newClientRequest = new ClientCreateRequest
50
60
{
@@ -71,7 +81,7 @@ public async Task Test_client_crud_sequence()
71
81
BackchannelLogoutInitiators = new BackchannelLogoutInitiators
72
82
{
73
83
Mode = LogoutInitiatorModes . Custom ,
74
- SelectedInitiators = new [ ] { LogoutInitiators . RpLogout , LogoutInitiators . IdpLogout , LogoutInitiators . PasswordChanged }
84
+ SelectedInitiators = selectedInitiators
75
85
} ,
76
86
BackchannelLogoutUrls = new [ ] { "https://create.com/logout" }
77
87
} ,
@@ -112,8 +122,7 @@ public async Task Test_client_crud_sequence()
112
122
newClientResponse . OrganizationRequireBehavior . Should ( ) . Be ( OrganizationRequireBehavior . PreLoginPrompt ) ;
113
123
newClientResponse . OidcLogout . BackchannelLogoutUrls [ 0 ] . Should ( ) . Be ( "https://create.com/logout" ) ;
114
124
newClientResponse . OidcLogout . BackchannelLogoutInitiators . Mode . Should ( ) . Be ( LogoutInitiatorModes . Custom ) ;
115
- newClientResponse . OidcLogout . BackchannelLogoutInitiators . SelectedInitiators . Length . Should ( ) . Be ( 3 ) ;
116
- newClientResponse . OidcLogout . BackchannelLogoutInitiators . SelectedInitiators . Any ( i => i == LogoutInitiators . PasswordChanged ) . Should ( ) . BeTrue ( ) ;
125
+ newClientResponse . OidcLogout . BackchannelLogoutInitiators . SelectedInitiators . Should ( ) . BeEquivalentTo ( selectedInitiators ) ;
117
126
newClientResponse . DefaultOrganization . OrganizationId . Should ( ) . Be ( existingOrganizationId ) ;
118
127
newClientResponse . RequirePushedAuthorizationRequests . Should ( ) . BeTrue ( ) ;
119
128
newClientResponse . SignedRequestObject . Should ( ) . NotBeNull ( ) ;
@@ -169,8 +178,7 @@ public async Task Test_client_crud_sequence()
169
178
updateClientResponse . OrganizationRequireBehavior . Should ( ) . Be ( OrganizationRequireBehavior . NoPrompt ) ;
170
179
updateClientResponse . OidcLogout . BackchannelLogoutUrls [ 0 ] . Should ( ) . Be ( "https://create.com/logout" ) ;
171
180
updateClientResponse . OidcLogout . BackchannelLogoutInitiators . Mode . Should ( ) . Be ( LogoutInitiatorModes . Custom ) ;
172
- updateClientResponse . OidcLogout . BackchannelLogoutInitiators . SelectedInitiators . Length . Should ( ) . Be ( 3 ) ;
173
- updateClientResponse . OidcLogout . BackchannelLogoutInitiators . SelectedInitiators . Any ( i => i == LogoutInitiators . PasswordChanged ) . Should ( ) . BeTrue ( ) ;
181
+ updateClientResponse . OidcLogout . BackchannelLogoutInitiators . SelectedInitiators . Should ( ) . BeEquivalentTo ( selectedInitiators ) ;
174
182
updateClientResponse . DefaultOrganization . OrganizationId . Should ( ) . Be ( existingOrganizationId ) ;
175
183
updateClientResponse . DefaultOrganization . Flows . Should ( ) . HaveCount ( 1 ) ;
176
184
updateClientResponse . DefaultOrganization . Flows . First ( ) . Should ( ) . Be ( Flows . ClientCredentials ) ;
@@ -420,4 +428,4 @@ public async Task Test_crud_credentials()
420
428
allCredentialsForClient . Should ( ) . BeEmpty ( ) ;
421
429
}
422
430
}
423
- }
431
+ }
0 commit comments