diff options
Diffstat (limited to 'spec/lib/gitlab/checks/branch_check_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/branch_check_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/checks/branch_check_spec.rb b/spec/lib/gitlab/checks/branch_check_spec.rb index c06d26d1441..d6280d3c28c 100644 --- a/spec/lib/gitlab/checks/branch_check_spec.rb +++ b/spec/lib/gitlab/checks/branch_check_spec.rb @@ -103,7 +103,7 @@ RSpec.describe Gitlab::Checks::BranchCheck do it 'prevents force push' do expect(Gitlab::Checks::ForcePush).to receive(:force_push?).and_return(true) - expect { subject.validate! }.to raise_error + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError) end end end @@ -126,7 +126,7 @@ RSpec.describe Gitlab::Checks::BranchCheck do it 'prevents force push' do expect(Gitlab::Checks::ForcePush).to receive(:force_push?).and_return(true) - expect { subject.validate! }.to raise_error + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError) end end @@ -141,7 +141,7 @@ RSpec.describe Gitlab::Checks::BranchCheck do it 'prevents force push' do expect(Gitlab::Checks::ForcePush).to receive(:force_push?).and_return(true) - expect { subject.validate! }.to raise_error + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::ForbiddenError) end end end |