diff options
Diffstat (limited to 'spec/models/guest_spec.rb')
-rw-r--r-- | spec/models/guest_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/guest_spec.rb b/spec/models/guest_spec.rb index c60bd7af958..0e9b94aac97 100644 --- a/spec/models/guest_spec.rb +++ b/spec/models/guest_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Guest, lib: true do +describe Guest do let(:public_project) { build_stubbed(:empty_project, :public) } let(:private_project) { build_stubbed(:empty_project, :private) } let(:internal_project) { build_stubbed(:empty_project, :internal) } @@ -8,13 +8,13 @@ describe Guest, lib: true do describe '.can_pull?' do context 'when project is private' do it 'does not allow to pull the repo' do - expect(Guest.can?(:download_code, private_project)).to eq(false) + expect(described_class.can?(:download_code, private_project)).to eq(false) end end context 'when project is internal' do it 'does not allow to pull the repo' do - expect(Guest.can?(:download_code, internal_project)).to eq(false) + expect(described_class.can?(:download_code, internal_project)).to eq(false) end end @@ -23,7 +23,7 @@ describe Guest, lib: true do it 'does not allow to pull the repo' do public_project.project_feature.update_attribute(:repository_access_level, ProjectFeature::DISABLED) - expect(Guest.can?(:download_code, public_project)).to eq(false) + expect(described_class.can?(:download_code, public_project)).to eq(false) end end @@ -31,13 +31,13 @@ describe Guest, lib: true do it 'does not allow to pull the repo' do public_project.project_feature.update_attribute(:repository_access_level, ProjectFeature::PRIVATE) - expect(Guest.can?(:download_code, public_project)).to eq(false) + expect(described_class.can?(:download_code, public_project)).to eq(false) end end context 'when repository is enabled' do it 'allows to pull the repo' do - expect(Guest.can?(:download_code, public_project)).to eq(true) + expect(described_class.can?(:download_code, public_project)).to eq(true) end end end |