Skip to content

Commit d928a29

Browse files
Merge branch 'main' into TriggerAu-Bug_JSONHelperArrayFix
2 parents 4849f7a + 036dde3 commit d928a29

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

tests/Api/OktaApplicationApi.Tests.ps1

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -97,41 +97,41 @@ Describe -tag 'Okta.PowerShell' -name 'OktaOktaApplicationApi' {
9797
It 'Test Initialize-OktaOpenIdConnectApplication' {
9898

9999
$OAuthClient = [PSCustomObject]@{
100-
Client_Uri = "https://example.com/client"
101-
Logo_Uri = "https://example.com/assets/images/logo-new.png"
102-
Response_Types = @("token", "id_token", "code")
103-
Redirect_Uris = @("https://example.com/oauth2/callback", "myapp://callback")
104-
Post_Logout_Redirect_Uris = @("https://example.com/postlogout", "myapp://postlogoutcallback")
105-
Grant_Types = @("implicit", "authorization_code")
106-
Application_Type = "native"
107-
Tos_Uri = "https://example.com/client/tos"
108-
Policy_Uri = "https://example.com/client/policy"
100+
client_uri = "https://example.com/client"
101+
logo_uri = "https://example.com/assets/images/logo-new.png"
102+
response_types = @("token", "id_token", "code")
103+
redirect_uris = @("https://example.com/oauth2/callback", "myapp://callback")
104+
post_logout_redirect_uris = @("https://example.com/postlogout", "myapp://postlogoutcallback")
105+
grant_types = @("implicit", "authorization_code")
106+
application_type = "native"
107+
tos_uri = "https://example.com/client/tos"
108+
policy_uri = "https://example.com/client/policy"
109109
}
110110
# a simple test to create an object
111111
$Settings = Initialize-OktaOpenIdConnectApplicationSettings -OauthClient $OAuthClient
112112

113-
$Settings.OauthClient.Client_Uri | Should -Be "https://example.com/client"
114-
$Settings.OauthClient.Logo_Uri | Should -Be "https://example.com/assets/images/logo-new.png"
115-
$Settings.OauthClient.Redirect_Uris.Count | Should -Be 2
116-
$Settings.OauthClient.Post_Logout_Redirect_Uris.Count | Should -Be 2
117-
$Settings.OauthClient.Grant_Types.Count | Should -Be 2
118-
$Settings.OauthClient.Application_Type | Should -Be "native"
119-
$Settings.OauthClient.Tos_Uri | Should -Be "https://example.com/client/tos"
120-
$Settings.OauthClient.Policy_Uri | Should -Be "https://example.com/client/policy"
113+
$Settings.OauthClient.client_uri | Should -Be "https://example.com/client"
114+
$Settings.OauthClient.logo_uri | Should -Be "https://example.com/assets/images/logo-new.png"
115+
$Settings.OauthClient.redirect_uris.Count | Should -Be 2
116+
$Settings.OauthClient.post_logout_redirect_uris.Count | Should -Be 2
117+
$Settings.OauthClient.grant_types.Count | Should -Be 2
118+
$Settings.OauthClient.application_type | Should -Be "native"
119+
$Settings.OauthClient.tos_uri | Should -Be "https://example.com/client/tos"
120+
$Settings.OauthClient.policy_uri | Should -Be "https://example.com/client/policy"
121121

122122
$NewObject = Initialize-OktaOpenIdConnectApplication -Label "New App" -SignOnMode "OPENID_CONNECT" -Settings $Settings
123123
$NewObject.Label | Should -Be "New App"
124124
$NewObject.Name | Should -Be "oidc_client"
125125
$NewObject.SignOnMode | Should -Be "OPENID_CONNECT"
126126

127-
$NewObject.Settings.OauthClient.Client_Uri | Should -Be "https://example.com/client"
128-
$NewObject.Settings.OauthClient.Logo_Uri | Should -Be "https://example.com/assets/images/logo-new.png"
129-
$NewObject.Settings.OauthClient.Redirect_Uris.Count | Should -Be 2
130-
$NewObject.Settings.OauthClient.Post_Logout_Redirect_Uris.Count | Should -Be 2
131-
$NewObject.Settings.OauthClient.Grant_Types.Count | Should -Be 2
132-
$NewObject.Settings.OauthClient.Application_Type | Should -Be "native"
133-
$NewObject.Settings.oauthClient.Tos_Uri | Should -Be "https://example.com/client/tos"
134-
$NewObject.Settings.oauthClient.Policy_Uri | Should -Be "https://example.com/client/policy"
127+
$NewObject.Settings.OauthClient.client_uri | Should -Be "https://example.com/client"
128+
$NewObject.Settings.OauthClient.logo_uri | Should -Be "https://example.com/assets/images/logo-new.png"
129+
$NewObject.Settings.OauthClient.redirect_uris.Count | Should -Be 2
130+
$NewObject.Settings.OauthClient.post_logout_redirect_uris.Count | Should -Be 2
131+
$NewObject.Settings.OauthClient.grant_types.Count | Should -Be 2
132+
$NewObject.Settings.OauthClient.application_type | Should -Be "native"
133+
$NewObject.Settings.oauthClient.tos_uri | Should -Be "https://example.com/client/tos"
134+
$NewObject.Settings.oauthClient.policy_uri | Should -Be "https://example.com/client/policy"
135135
}
136136

137137
It 'Test New-OktaApplication OpenIdConnectApplication' {
@@ -147,15 +147,15 @@ Describe -tag 'Okta.PowerShell' -name 'OktaOktaApplicationApi' {
147147
Mock -ModuleName Okta.PowerShell Invoke-OktaApiClient { return $Response } -Verifiable
148148

149149
$OAuthClient = [PSCustomObject]@{
150-
Client_Uri = "https://example.com/client"
151-
Logo_Uri = "https://example.com/assets/images/logo-new.png"
152-
Response_Types = @("token", "id_token", "code")
153-
Redirect_Uris = @("https://example.com/oauth2/callback", "myapp://callback")
154-
Post_Logout_Redirect_Uris = @("https://example.com/postlogout", "myapp://postlogoutcallback")
155-
Grant_Types = @("implicit", "authorization_code")
156-
Application_Type = "native"
157-
Tos_Uri = "https://example.com/client/tos"
158-
Policy_Uri = "https://example.com/client/policy"
150+
client_uri = "https://example.com/client"
151+
logo_uri = "https://example.com/assets/images/logo-new.png"
152+
response_types = @("token", "id_token", "code")
153+
redirect_uris = @("https://example.com/oauth2/callback", "myapp://callback")
154+
post_logout_redirect_uris = @("https://example.com/postlogout", "myapp://postlogoutcallback")
155+
grant_types = @("implicit", "authorization_code")
156+
application_type = "native"
157+
tos_uri = "https://example.com/client/tos"
158+
policy_uri = "https://example.com/client/policy"
159159
}
160160
# a simple test to create an object
161161
$Settings = Initialize-OktaOpenIdConnectApplicationSettings -OauthClient $OAuthClient
@@ -173,15 +173,15 @@ Describe -tag 'Okta.PowerShell' -name 'OktaOktaApplicationApi' {
173173
$TestResult.Status | Should -Be "ACTIVE"
174174

175175
# TODO make Case consistent (i.e ClientUri)
176-
$TestResult.Settings.OauthClient.Client_Uri | Should -Be "https://example.com/client"
177-
$TestResult.Settings.OauthClient.Logo_Uri | Should -Be "https://example.com/assets/images/logo-new.png"
178-
$TestResult.Settings.OauthClient.Redirect_Uris.Count | Should -Be 2
179-
$TestResult.Settings.OauthClient.Post_Logout_Redirect_Uris.Count | Should -Be 2
180-
$TestResult.Settings.OauthClient.Grant_Types.Count | Should -Be 2
176+
$TestResult.Settings.OauthClient.client_uri | Should -Be "https://example.com/client"
177+
$TestResult.Settings.OauthClient.logo_uri | Should -Be "https://example.com/assets/images/logo-new.png"
178+
$TestResult.Settings.OauthClient.redirect_uris.Count | Should -Be 2
179+
$TestResult.Settings.OauthClient.post_logout_redirect_uris.Count | Should -Be 2
180+
$TestResult.Settings.OauthClient.grant_types.Count | Should -Be 2
181181
$TestResult.Settings.OauthClient.idp_initiated_login | Should -Not -Be $null
182-
$TestResult.Settings.OauthClient.Application_Type | Should -Be "native"
183-
$TestResult.Settings.OauthClient.Consent_Method | Should -Be "trusted"
184-
$TestResult.Settings.OauthClient.Tos_Uri | Should -Be "https://example.com/client/tos"
182+
$TestResult.Settings.OauthClient.application_type | Should -Be "native"
183+
$TestResult.Settings.OauthClient.consent_method | Should -Be "trusted"
184+
$TestResult.Settings.OauthClient.tos_uri | Should -Be "https://example.com/client/tos"
185185
}
186186
}
187187

@@ -207,15 +207,15 @@ Describe -tag 'Okta.PowerShell' -name 'OktaOktaApplicationApi' {
207207
$TestResult.SignOnMode | Should -Be "OPENID_CONNECT"
208208
$TestResult.Status | Should -Be "ACTIVE"
209209

210-
$TestResult.Settings.OauthClient.Client_Uri | Should -Be "https://example.com/client"
211-
$TestResult.Settings.OauthClient.Logo_Uri | Should -Be "https://example.com/assets/images/logo-new.png"
212-
$TestResult.Settings.OauthClient.Redirect_Uris.Count | Should -Be 2
213-
$TestResult.Settings.OauthClient.Post_Logout_Redirect_Uris.Count | Should -Be 2
214-
$TestResult.Settings.OauthClient.Grant_Types.Count | Should -Be 2
210+
$TestResult.Settings.OauthClient.client_uri | Should -Be "https://example.com/client"
211+
$TestResult.Settings.OauthClient.logo_uri | Should -Be "https://example.com/assets/images/logo-new.png"
212+
$TestResult.Settings.OauthClient.redirect_uris.Count | Should -Be 2
213+
$TestResult.Settings.OauthClient.post_logout_redirect_uris.Count | Should -Be 2
214+
$TestResult.Settings.OauthClient.grant_types.Count | Should -Be 2
215215
$TestResult.Settings.OauthClient.idp_initiated_login | Should -Not -Be $null
216-
$TestResult.Settings.OauthClient.Application_Type | Should -Be "native"
217-
$TestResult.Settings.OauthClient.Consent_Method | Should -Be "trusted"
218-
$TestResult.Settings.OauthClient.Tos_Uri | Should -Be "https://example.com/client/tos"
216+
$TestResult.Settings.OauthClient.application_type | Should -Be "native"
217+
$TestResult.Settings.OauthClient.consent_method | Should -Be "trusted"
218+
$TestResult.Settings.OauthClient.tos_uri | Should -Be "https://example.com/client/tos"
219219

220220
}
221221
}

0 commit comments

Comments
 (0)