Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-28 12:53:58 +0300
committerDouwe Maan <douwe@gitlab.com>2018-05-28 12:53:58 +0300
commita45b9fc96ca568b19fd9d09a8b40846c2c8b5b36 (patch)
treeecc3e3274e9d13be5c294068d44ff12b9d92ccb8 /spec
parent5f5fc69dde0d7098b72b047090c8a4f56d495002 (diff)
parent7a139c1602016485b8a2038dfc6121e47039c669 (diff)
Merge branch 'bvl-add-username-to-terms-message' into 'master'
Add username to terms message in git and API calls Closes #46649 See merge request gitlab-org/gitlab-ce!19126
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/auth/user_access_denied_reason_spec.rb3
-rw-r--r--spec/lib/gitlab/git_access_spec.rb2
-rw-r--r--spec/requests/api/helpers_spec.rb2
3 files changed, 4 insertions, 3 deletions
diff --git a/spec/lib/gitlab/auth/user_access_denied_reason_spec.rb b/spec/lib/gitlab/auth/user_access_denied_reason_spec.rb
index fa209bed74e..002ce776be9 100644
--- a/spec/lib/gitlab/auth/user_access_denied_reason_spec.rb
+++ b/spec/lib/gitlab/auth/user_access_denied_reason_spec.rb
@@ -22,7 +22,8 @@ describe Gitlab::Auth::UserAccessDeniedReason do
enforce_terms
end
- it { is_expected.to match /You must accept the Terms of Service/ }
+ it { is_expected.to match /must accept the Terms of Service/ }
+ it { is_expected.to include(user.username) }
end
context 'when the user is internal' do
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb
index 317a932d5a6..dfffea7797f 100644
--- a/spec/lib/gitlab/git_access_spec.rb
+++ b/spec/lib/gitlab/git_access_spec.rb
@@ -1055,7 +1055,7 @@ describe Gitlab::GitAccess do
it 'blocks access when the user did not accept terms', :aggregate_failures do
actions.each do |action|
- expect { action.call }.to raise_unauthorized(/You must accept the Terms of Service in order to perform this action/)
+ expect { action.call }.to raise_unauthorized(/must accept the Terms of Service in order to perform this action/)
end
end
diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb
index d3ab44c0d7e..d8a51f36dba 100644
--- a/spec/requests/api/helpers_spec.rb
+++ b/spec/requests/api/helpers_spec.rb
@@ -171,7 +171,7 @@ describe API::Helpers do
end
it 'returns a 403 when a user has not accepted the terms' do
- expect { current_user }.to raise_error /You must accept the Terms of Service/
+ expect { current_user }.to raise_error /must accept the Terms of Service/
end
it 'sets the current user when the user accepted the terms' do