diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/lib/gitlab/git_access_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/lib/gitlab/git_access_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git_access_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index bf2e3c7f5f8..4bf7994f4dd 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -96,7 +96,7 @@ RSpec.describe Gitlab::GitAccess do context 'when the DeployKey has access to the project' do before do - deploy_key.deploy_keys_projects.create(project: project, can_push: true) + deploy_key.deploy_keys_projects.create!(project: project, can_push: true) end it 'allows push and pull access' do @@ -820,7 +820,7 @@ RSpec.describe Gitlab::GitAccess do project.add_role(user, role) end - protected_branch.save + protected_branch.save! aggregate_failures do matrix.each do |action, allowed| @@ -1090,7 +1090,7 @@ RSpec.describe Gitlab::GitAccess do context 'when deploy_key can push' do context 'when project is authorized' do before do - key.deploy_keys_projects.create(project: project, can_push: true) + key.deploy_keys_projects.create!(project: project, can_push: true) end it { expect { push_access_check }.not_to raise_error } @@ -1120,7 +1120,7 @@ RSpec.describe Gitlab::GitAccess do context 'when deploy_key cannot push' do context 'when project is authorized' do before do - key.deploy_keys_projects.create(project: project, can_push: false) + key.deploy_keys_projects.create!(project: project, can_push: false) end it { expect { push_access_check }.to raise_forbidden(described_class::ERROR_MESSAGES[:deploy_key_upload]) } |