diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-26 17:44:58 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-01-26 17:44:59 -0500 |
commit | fcb37542e746d69f20094e2918e498564bbcd863 (patch) | |
tree | f275f062ac4df997a54f5cbbefa4b4104eb7e6ad /spec/support | |
parent | f27721e842b608f4a63bd0bc59ce77175ae530ca (diff) | |
download | gitlab-ce-fcb37542e746d69f20094e2918e498564bbcd863.tar.gz |
Use `:empty_project` where possible in model specsrs-empty_project-models
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/cycle_analytics_helpers/test_generation.rb | 2 | ||||
-rw-r--r-- | spec/support/mentionable_shared_examples.rb | 2 | ||||
-rw-r--r-- | spec/support/slack_mattermost_notifications_shared_examples.rb | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/cycle_analytics_helpers/test_generation.rb b/spec/support/cycle_analytics_helpers/test_generation.rb index 35b40d73191..10b90b40ba7 100644 --- a/spec/support/cycle_analytics_helpers/test_generation.rb +++ b/spec/support/cycle_analytics_helpers/test_generation.rb @@ -54,7 +54,7 @@ module CycleAnalyticsHelpers end context "when the data belongs to another project" do - let(:other_project) { create(:project) } + let(:other_project) { create(:project, :repository) } it "returns nil" do # Use a stub to "trick" the data/condition functions diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb index f57c82809a6..87936bb4859 100644 --- a/spec/support/mentionable_shared_examples.rb +++ b/spec/support/mentionable_shared_examples.rb @@ -12,7 +12,7 @@ shared_context 'mentionable context' do let!(:mentioned_mr) { create(:merge_request, source_project: project) } let(:mentioned_commit) { project.commit("HEAD~1") } - let(:ext_proj) { create(:project, :public) } + let(:ext_proj) { create(:project, :public, :repository) } let(:ext_issue) { create(:issue, project: ext_proj) } let(:ext_mr) { create(:merge_request, :simple, source_project: ext_proj) } let(:ext_commit) { ext_proj.commit("HEAD~2") } diff --git a/spec/support/slack_mattermost_notifications_shared_examples.rb b/spec/support/slack_mattermost_notifications_shared_examples.rb index 74d9b8c6313..704922b6cf4 100644 --- a/spec/support/slack_mattermost_notifications_shared_examples.rb +++ b/spec/support/slack_mattermost_notifications_shared_examples.rb @@ -26,7 +26,7 @@ RSpec.shared_examples 'slack or mattermost notifications' do describe "#execute" do let(:user) { create(:user) } - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:username) { 'slack_username' } let(:channel) { 'slack_channel' } @@ -196,7 +196,7 @@ RSpec.shared_examples 'slack or mattermost notifications' do describe "Note events" do let(:user) { create(:user) } - let(:project) { create(:project, creator_id: user.id) } + let(:project) { create(:project, :repository, creator: user) } before do allow(chat_service).to receive_messages( @@ -269,7 +269,7 @@ RSpec.shared_examples 'slack or mattermost notifications' do describe 'Pipeline events' do let(:user) { create(:user) } - let(:project) { create(:project) } + let(:project) { create(:project, :repository) } let(:pipeline) do create(:ci_pipeline, |