From f230fc3bf4c5ebb1f1261fd936c8f75bcf79fe29 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:13:40 +0100 Subject: [PATCH] chore: synchronize workspaces --- selfservice/strategy/password/settings_test.go | 6 +++--- selfservice/strategy/profile/strategy_test.go | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/selfservice/strategy/password/settings_test.go b/selfservice/strategy/password/settings_test.go index 5393e5779cfc..65e17f635f03 100644 --- a/selfservice/strategy/password/settings_test.go +++ b/selfservice/strategy/password/settings_test.go @@ -203,7 +203,7 @@ func TestSettings(t *testing.T) { values.Set("password", x.NewUUID().String()) actual, res := testhelpers.SettingsMakeRequest(t, true, false, f, apiUser2, testhelpers.EncodeFormAsJSON(t, true, values)) assert.Equal(t, http.StatusForbidden, res.StatusCode) - assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by another person", "%s", actual) + assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by someone else", "%s", actual) }) t.Run("type=spa", func(t *testing.T) { @@ -213,7 +213,7 @@ func TestSettings(t *testing.T) { values.Set("password", x.NewUUID().String()) actual, res := testhelpers.SettingsMakeRequest(t, false, true, f, browserUser2, values.Encode()) assert.Equal(t, http.StatusForbidden, res.StatusCode) - assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by another person", "%s", actual) + assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by someone else", "%s", actual) }) t.Run("type=browser", func(t *testing.T) { @@ -223,7 +223,7 @@ func TestSettings(t *testing.T) { values.Set("password", x.NewUUID().String()) actual, res := testhelpers.SettingsMakeRequest(t, false, false, f, browserUser2, values.Encode()) assert.Equal(t, http.StatusForbidden, res.StatusCode) - assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by another person", "%s", actual) + assert.Contains(t, gjson.Get(actual, "error.reason").String(), "initiated by someone else", "%s", actual) }) }) diff --git a/selfservice/strategy/profile/strategy_test.go b/selfservice/strategy/profile/strategy_test.go index f67407fe799f..8daeca757696 100644 --- a/selfservice/strategy/profile/strategy_test.go +++ b/selfservice/strategy/profile/strategy_test.go @@ -275,8 +275,8 @@ func TestStrategyTraits(t *testing.T) { values := testhelpers.SDKFormFieldsToURLValues(f.Ui.Nodes) 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, "ui.messages.0.text").String(), "initiated by someone else", "%s", actual) }) t.Run("type=spa", func(t *testing.T) { @@ -284,8 +284,8 @@ func TestStrategyTraits(t *testing.T) { values := testhelpers.SDKFormFieldsToURLValues(f.Ui.Nodes) actual, res := testhelpers.SettingsMakeRequest(t, false, true, f, browserUser2, 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, "ui.messages.0.text").String(), "initiated by someone else", "%s", actual) }) t.Run("type=browser", func(t *testing.T) { @@ -293,8 +293,8 @@ func TestStrategyTraits(t *testing.T) { values := testhelpers.SDKFormFieldsToURLValues(f.Ui.Nodes) 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, "ui.messages.0.text").String(), "initiated by someone else", "%s", actual) }) })