summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 8d916b79b13..473b7a88d61 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Project, models: true do
+describe Project do
describe 'associations' do
it { is_expected.to belong_to(:group) }
it { is_expected.to belong_to(:namespace) }
@@ -77,7 +77,7 @@ describe Project, models: true do
context 'after initialized' do
it "has a project_feature" do
- expect(Project.new.project_feature).to be_present
+ expect(described_class.new.project_feature).to be_present
end
end
@@ -438,7 +438,7 @@ describe Project, models: true do
end
it 'returns valid url to repo' do
- project = Project.new(path: 'somewhere')
+ project = described_class.new(path: 'somewhere')
expect(project.url_to_repo).to eq(Gitlab.config.gitlab_shell.ssh_path_prefix + 'somewhere.git')
end
@@ -917,7 +917,7 @@ describe Project, models: true do
end
describe '.with_shared_runners' do
- subject { Project.with_shared_runners }
+ subject { described_class.with_shared_runners }
context 'when shared runners are enabled for project' do
let!(:project) { create(:empty_project, shared_runners_enabled: true) }
@@ -942,10 +942,10 @@ describe Project, models: true do
let!(:project2) { create(:empty_project, :public, group: group) }
it 'returns total project count' do
- expect(Project).to receive(:count).once.and_call_original
+ expect(described_class).to receive(:count).once.and_call_original
3.times do
- expect(Project.cached_count).to eq(2)
+ expect(described_class.cached_count).to eq(2)
end
end
end
@@ -990,7 +990,7 @@ describe Project, models: true do
user1.toggle_star(project1)
user2.toggle_star(project2)
- expect(Project.starred_by(user1)).to contain_exactly(project1)
+ expect(described_class.starred_by(user1)).to contain_exactly(project1)
end
end
@@ -2012,7 +2012,7 @@ describe Project, models: true do
let!(:path) { project1.namespace.full_path }
it 'returns correct project' do
- expect(Project.inside_path(path)).to eq([project1])
+ expect(described_class.inside_path(path)).to eq([project1])
end
end
@@ -2216,7 +2216,7 @@ describe Project, models: true do
context 'with a user' do
let(:projects) do
- Project.all.public_or_visible_to_user(user)
+ described_class.all.public_or_visible_to_user(user)
end
it 'includes projects the user has access to' do
@@ -2230,7 +2230,7 @@ describe Project, models: true do
context 'without a user' do
it 'only includes public projects' do
- projects = Project.all.public_or_visible_to_user
+ projects = described_class.all.public_or_visible_to_user
expect(projects).to eq([public_project])
end