diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-01 21:51:52 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-01 21:51:52 +0300 |
commit | 9513bd18c43b749c8856d6ad89635d97c8fb73b5 (patch) | |
tree | b55d7fb920f0d6a8e10eabae1cafa5126fa03203 /spec/models/concerns | |
parent | 4c77c30fbfb3734fd893f7cfe540fa595ea6539c (diff) |
Ensure all project factories use `:repository` trait or `:empty_project`
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/participable_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/concerns/resolvable_note_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/concerns/routable_spec.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/concerns/participable_spec.rb b/spec/models/concerns/participable_spec.rb index 431f1482615..6c4b5a9e9d6 100644 --- a/spec/models/concerns/participable_spec.rb +++ b/spec/models/concerns/participable_spec.rb @@ -24,7 +24,7 @@ describe Participable do user1 = build(:user) user2 = build(:user) user3 = build(:user) - project = build(:project, :public) + project = build(:empty_project, :public) instance = model.new expect(instance).to receive(:foo).and_return(user2) @@ -57,7 +57,7 @@ describe Participable do other = other_model.new user1 = build(:user) user2 = build(:user) - project = build(:project, :public) + project = build(:empty_project, :public) expect(instance).to receive(:foo).and_return(other) expect(other).to receive(:bar).and_return(user2) @@ -69,7 +69,7 @@ describe Participable do context 'when using a Proc as an attribute' do it 'calls the supplied Proc' do user1 = build(:user) - project = build(:project, :public) + project = build(:empty_project, :public) user_arg = nil ext_arg = nil diff --git a/spec/models/concerns/resolvable_note_spec.rb b/spec/models/concerns/resolvable_note_spec.rb index 53eaa6f8461..d00faa4f8be 100644 --- a/spec/models/concerns/resolvable_note_spec.rb +++ b/spec/models/concerns/resolvable_note_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Note, ResolvableNote do - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } subject { create(:discussion_note_on_merge_request, noteable: merge_request, project: project) } diff --git a/spec/models/concerns/routable_spec.rb b/spec/models/concerns/routable_spec.rb index 36aedd2f701..866a835d62a 100644 --- a/spec/models/concerns/routable_spec.rb +++ b/spec/models/concerns/routable_spec.rb @@ -27,7 +27,7 @@ describe Group, 'Routable' do it 'ensure route path uniqueness across different objects' do create(:group, parent: group, path: 'xyz') - duplicate = build(:project, namespace: group, path: 'xyz') + duplicate = build(:empty_project, namespace: group, path: 'xyz') expect { duplicate.save! }.to raise_error(ActiveRecord::RecordInvalid, 'Validation failed: Route path has already been taken, Route is invalid') end |