summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-28 09:53:58 +0000
committerDouwe Maan <douwe@gitlab.com>2018-05-28 09:53:58 +0000
commita45b9fc96ca568b19fd9d09a8b40846c2c8b5b36 (patch)
treeecc3e3274e9d13be5c294068d44ff12b9d92ccb8 /spec/lib/gitlab
parent5f5fc69dde0d7098b72b047090c8a4f56d495002 (diff)
parent7a139c1602016485b8a2038dfc6121e47039c669 (diff)
downloadgitlab-ce-a45b9fc96ca568b19fd9d09a8b40846c2c8b5b36.tar.gz
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/lib/gitlab')
-rw-r--r--spec/lib/gitlab/auth/user_access_denied_reason_spec.rb3
-rw-r--r--spec/lib/gitlab/git_access_spec.rb2
2 files changed, 3 insertions, 2 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