From 32a8eb53720f79725d6e073cd1a6304060c0d1e9 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:44:31 +0100 Subject: [PATCH] chore: synchronize workspaces --- selfservice/strategy/password/settings_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/selfservice/strategy/password/settings_test.go b/selfservice/strategy/password/settings_test.go index 3c5a3c9f9615..5393e5779cfc 100644 --- a/selfservice/strategy/password/settings_test.go +++ b/selfservice/strategy/password/settings_test.go @@ -202,8 +202,8 @@ func TestSettings(t *testing.T) { values.Set("method", "password") values.Set("password", x.NewUUID().String()) actual, res := testhelpers.SettingsMakeRequest(t, true, false, f, apiUser2, testhelpers.EncodeFormAsJSON(t, true, values)) - assert.Equal(t, http.StatusBadRequest, res.StatusCode) - assert.Contains(t, gjson.Get(actual, "ui.messages.0.text").String(), "initiated by another person", "%s", actual) + assert.Equal(t, http.StatusForbidden, res.StatusCode) + assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by another person", "%s", actual) }) t.Run("type=spa", func(t *testing.T) { @@ -212,8 +212,8 @@ func TestSettings(t *testing.T) { values.Set("method", "password") values.Set("password", x.NewUUID().String()) actual, res := testhelpers.SettingsMakeRequest(t, false, true, f, browserUser2, values.Encode()) - assert.Equal(t, http.StatusBadRequest, res.StatusCode) - assert.Contains(t, gjson.Get(actual, "ui.messages.0.text").String(), "initiated by another person", "%s", actual) + assert.Equal(t, http.StatusForbidden, res.StatusCode) + assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by another person", "%s", actual) }) t.Run("type=browser", func(t *testing.T) { @@ -222,8 +222,8 @@ func TestSettings(t *testing.T) { values.Set("method", "password") values.Set("password", x.NewUUID().String()) actual, res := testhelpers.SettingsMakeRequest(t, false, false, f, browserUser2, values.Encode()) - assert.Equal(t, http.StatusOK, res.StatusCode) - assert.Contains(t, gjson.Get(actual, "ui.messages.0.text").String(), "initiated by another person", "%s", actual) + assert.Equal(t, http.StatusForbidden, res.StatusCode) + assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by another person", "%s", actual) }) })