summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/merge_request_spec.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index fce236bcb5d..38c2a28d3e1 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -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