BigW Consortium Gitlab

Commit 93ab5856 by Lin Jen-Shin

Use factory instead of using new directly. Feedback:

parent a14d6a9e
......@@ -524,18 +524,11 @@ describe MergeRequest, models: true do
end
context 'with unsaved merge request' do
let(:project) { create(:project) }
subject do
MergeRequest.new(source_project: project,
target_project: project,
source_branch: 'master',
target_branch: 'feature')
end
subject { build(:merge_request) }
let!(:pipeline) do
create(:ci_empty_pipeline,
project: project,
project: subject.project,
sha: subject.diff_head_sha,
ref: subject.source_branch)
end
......
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