Commit 1d7a1e9c authored by Shinya Maeda's avatar Shinya Maeda

Fix spec

parent 2b3b5c3b
...@@ -413,7 +413,7 @@ describe Ci::CreatePipelineService do ...@@ -413,7 +413,7 @@ describe Ci::CreatePipelineService do
end end
context 'when trigger belongs to a developer' do context 'when trigger belongs to a developer' do
let(:user) {} let(:user) { trigger_request.trigger.owner }
let(:trigger_request) do let(:trigger_request) do
create(:ci_trigger_request).tap do |request| create(:ci_trigger_request).tap do |request|
...@@ -431,7 +431,7 @@ describe Ci::CreatePipelineService do ...@@ -431,7 +431,7 @@ describe Ci::CreatePipelineService do
end end
context 'when trigger belongs to a master' do context 'when trigger belongs to a master' do
let(:user) {} let(:user) { trigger_request.trigger.owner }
let(:trigger_request) do let(:trigger_request) do
create(:ci_trigger_request).tap do |request| create(:ci_trigger_request).tap do |request|
...@@ -441,7 +441,7 @@ describe Ci::CreatePipelineService do ...@@ -441,7 +441,7 @@ describe Ci::CreatePipelineService do
end end
end end
it 'does not create a pipeline' do it 'creates a pipeline' do
expect(execute_service(trigger_request: trigger_request)) expect(execute_service(trigger_request: trigger_request))
.to be_persisted .to be_persisted
expect(Ci::Pipeline.count).to eq(1) expect(Ci::Pipeline.count).to eq(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment