diff options
Diffstat (limited to 'spec/lib/gitlab/git_access_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git_access_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index 9a1ecfe6459..ae9c697e0b9 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -554,19 +554,19 @@ RSpec.describe Gitlab::GitAccess do context 'when the repository is public' do let(:options) { %i[repository_enabled] } - it { expect { pull_access_check }.to raise_error('The project you were looking for could not be found.') } + it { expect { pull_access_check }.to raise_error("The project you were looking for could not be found or you don't have permission to view it.") } end context 'when the repository is private' do let(:options) { %i[repository_private] } - it { expect { pull_access_check }.to raise_error('The project you were looking for could not be found.') } + it { expect { pull_access_check }.to raise_error("The project you were looking for could not be found or you don't have permission to view it.") } end context 'when the repository is disabled' do let(:options) { %i[repository_disabled] } - it { expect { pull_access_check }.to raise_error('The project you were looking for could not be found.') } + it { expect { pull_access_check }.to raise_error("The project you were looking for could not be found or you don't have permission to view it.") } end end end @@ -596,13 +596,13 @@ RSpec.describe Gitlab::GitAccess do context 'when the repository is private' do let(:options) { %i[repository_private] } - it { expect { pull_access_check }.to raise_error('The project you were looking for could not be found.') } + it { expect { pull_access_check }.to raise_error("The project you were looking for could not be found or you don't have permission to view it.") } end context 'when the repository is disabled' do let(:options) { %i[repository_disabled] } - it { expect { pull_access_check }.to raise_error('The project you were looking for could not be found.') } + it { expect { pull_access_check }.to raise_error("The project you were looking for could not be found or you don't have permission to view it.") } end end end @@ -1034,7 +1034,7 @@ RSpec.describe Gitlab::GitAccess do end end - context 'when the repository is read only' do + context 'when the repository is read-only' do let(:project) { create(:project, :repository, :read_only) } it 'denies push access' do |