diff --git a/management/prompt_test.go b/management/prompt_test.go index 34c31539..a99a0588 100644 --- a/management/prompt_test.go +++ b/management/prompt_test.go @@ -143,7 +143,7 @@ func TestPromptManager_ReadRendering(t *testing.T) { assert.Equal(t, ScreenSignup, *actual.GetScreen()) } -// Able to update the renderingMode to advanced and the setting configs when parsing the advanced renderingMode in payload +// Able to update the renderingMode to advanced and the setting configs when parsing the advanced renderingMode in payload. func TestPromptManager_UpdateRenderingWithAdvancedMode(t *testing.T) { configureHTTPTestRecordings(t) @@ -168,7 +168,7 @@ func TestPromptManager_UpdateRenderingWithAdvancedMode(t *testing.T) { assert.Equal(t, ScreenSignup, *actual.GetScreen()) } -// Unable to update the setting configs and only able to update the renderingMode to standard when parsing the standard renderingMode in payload +// Unable to update the setting configs and only able to update the renderingMode to standard when parsing the standard renderingMode in payload. func TestPromptManager_UpdateRenderingWithStandardMode(t *testing.T) { configureHTTPTestRecordings(t) @@ -187,15 +187,16 @@ func TestPromptManager_UpdateRenderingWithStandardMode(t *testing.T) { actual, err := api.Prompt.ReadRendering(context.Background(), PromptSignup, ScreenSignup) assert.NoError(t, err) - assert.Equal(t, expected.GetRenderingMode(), actual.GetRenderingMode()) - assert.NotEqual(t, expected.GetContextConfiguration(), actual.GetContextConfiguration()) - assert.NotEqual(t, expected.GetDefaultHeadTagsDisabled(), actual.GetDefaultHeadTagsDisabled()) + + assert.Equal(t, updateData.GetRenderingMode(), actual.GetRenderingMode()) + assert.NotEqual(t, updateData.GetContextConfiguration(), actual.GetContextConfiguration()) + assert.NotEqual(t, updateData.GetDefaultHeadTagsDisabled(), actual.GetDefaultHeadTagsDisabled()) assert.Equal(t, expected.HeadTags, actual.HeadTags) assert.Equal(t, PromptSignup, *actual.GetPrompt()) assert.Equal(t, ScreenSignup, *actual.GetScreen()) } -// Able to update the setting's configs even the existing renderingMode is standard since renderingMode is not parsed in payload(updateData) +// Able to update the setting's configs even the existing renderingMode is standard since renderingMode is not parsed in payload(updateData). func TestPromptManager_UpdateRendering(t *testing.T) { configureHTTPTestRecordings(t) diff --git a/test/data/recordings/TestPromptManager_UpdateRenderingWithStandardMode.yaml b/test/data/recordings/TestPromptManager_UpdateRenderingWithStandardMode.yaml index 592c19fe..0260c955 100644 --- a/test/data/recordings/TestPromptManager_UpdateRenderingWithStandardMode.yaml +++ b/test/data/recordings/TestPromptManager_UpdateRenderingWithStandardMode.yaml @@ -16,10 +16,10 @@ interactions: {"domain":"1734698728.auth.uat.auth0.com","type":"auth0_managed_certs","tls_policy":"recommended"} form: {} headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0/1.13.0 + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.13.0 url: https://go-auth0-dev.eu.auth0.com/api/v2/custom-domains method: POST response: @@ -28,12 +28,12 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 342 + content_length: 169 uncompressed: false body: '{"custom_domain_id":"cd_hW5C18CQPXRsKpDz","domain":"1733383424.auth.uat.auth0.com","primary":true,"status":"pending_verification","type":"auth0_managed_certs","verification":{"methods":[{"name":"CNAME","record":"go-auth0-dev.eu.auth0.com-cd-hw5c18cqpxrskpdz.edge.tenants.us.auth0.com","domain":"1733383424.auth.uat.auth0.com"}]},"tls_policy":"recommended"}' headers: - Content-Type: - - application/json; charset=utf-8 + Content-Type: + - application/json; charset=utf-8 status: 201 Created code: 201 duration: 994.566333ms @@ -72,7 +72,7 @@ interactions: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 2.057963083s + duration: 1.247840334s - id: 2 request: proto: HTTP/1.1 @@ -108,7 +108,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 1.022270875s + duration: 894.029792ms - id: 3 request: proto: HTTP/1.1 @@ -144,7 +144,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 1.863281333s + duration: 900.59625ms - id: 4 request: proto: HTTP/1.1 @@ -179,7 +179,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 1.830981625s + duration: 952.041666ms - id: 5 request: proto: HTTP/1.1 @@ -214,7 +214,7 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 1.763990917s + duration: 921.355709ms - id: 6 request: proto: HTTP/1.1 @@ -229,10 +229,10 @@ interactions: body: "" form: {} headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0/1.13.0 + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.13.0 url: https://go-auth0-dev.eu.auth0.com/api/v2/custom-domains/cd_hW5C18CQPXRsKpDz method: DELETE response: @@ -245,8 +245,8 @@ interactions: uncompressed: false body: "" headers: - Content-Type: - - application/json; charset=utf-8 + Content-Type: + - application/json; charset=utf-8 status: 204 No Content code: 204 duration: 411.741083ms