diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-01-30 05:10:37 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-01-31 04:56:51 +0000 |
commit | e33e3d29ae56ddd10b66513c35f3e318ea375cb9 (patch) | |
tree | ce5d1515f93c1e38a01c95b5e0f07f1b572f3763 /spec/lib/gitlab/checks/branch_check_spec.rb | |
parent | b5f089f2b7100dffb1a346e95022f88e6ff06415 (diff) | |
download | gitlab-ce-i18n-cop.tar.gz |
Autofixed some untranslated stringsi18n-cop
Diffstat (limited to 'spec/lib/gitlab/checks/branch_check_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/branch_check_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/checks/branch_check_spec.rb b/spec/lib/gitlab/checks/branch_check_spec.rb index 77366e91dca..65b1094f47c 100644 --- a/spec/lib/gitlab/checks/branch_check_spec.rb +++ b/spec/lib/gitlab/checks/branch_check_spec.rb @@ -15,7 +15,7 @@ describe Gitlab::Checks::BranchCheck do let(:ref) { 'refs/heads/master' } it 'raises an error' do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'The default branch of a project cannot be deleted.') + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, _('The default branch of a project cannot be deleted.')) end end @@ -28,7 +28,7 @@ describe Gitlab::Checks::BranchCheck do it 'raises an error if the user is not allowed to do forced pushes to protected branches' do expect(Gitlab::Checks::ForcePush).to receive(:force_push?).and_return(true) - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to force push code to a protected branch on this project.') + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, _('You are not allowed to force push code to a protected branch on this project.')) end it 'raises an error if the user is not allowed to merge to protected branches' do @@ -36,13 +36,13 @@ describe Gitlab::Checks::BranchCheck do expect(user_access).to receive(:can_merge_to_branch?).and_return(false) expect(user_access).to receive(:can_push_to_branch?).and_return(false) - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to merge code into protected branches on this project.') + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, _('You are not allowed to merge code into protected branches on this project.')) end it 'raises an error if the user is not allowed to push to protected branches' do expect(user_access).to receive(:can_push_to_branch?).and_return(false) - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to push code to protected branches on this project.') + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, _('You are not allowed to push code to protected branches on this project.')) end context 'when project repository is empty' do @@ -61,7 +61,7 @@ describe Gitlab::Checks::BranchCheck do context 'if the user is not allowed to delete protected branches' do it 'raises an error' do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to delete protected branches from this project. Only a project maintainer or owner can delete a protected branch.') + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, _('You are not allowed to delete protected branches from this project. Only a project maintainer or owner can delete a protected branch.')) end end @@ -80,7 +80,7 @@ describe Gitlab::Checks::BranchCheck do context 'over SSH or HTTP' do it 'raises an error' do - expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You can only delete protected branches using the web interface.') + expect { subject.validate! }.to raise_error(Gitlab::GitAccess::UnauthorizedError, _('You can only delete protected branches using the web interface.')) end end end |