diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-01-20 05:41:11 +0300 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2019-01-20 16:42:10 +0300 |
commit | 9da3ae70923fdf35e4850676cc1d238e5d63ea16 (patch) | |
tree | cf15171422b35d7af5f6458d8e3174eea28723c4 /spec/services/merge_requests/refresh_service_spec.rb | |
parent | 49efb57914b7daac651e0b3fbeb850584be66ce7 (diff) |
Don't create merge request pipeline without commits
Diffstat (limited to 'spec/services/merge_requests/refresh_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/refresh_service_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/services/merge_requests/refresh_service_spec.rb b/spec/services/merge_requests/refresh_service_spec.rb index 1169ed5f9f2..57b8e71c2d5 100644 --- a/spec/services/merge_requests/refresh_service_spec.rb +++ b/spec/services/merge_requests/refresh_service_spec.rb @@ -150,11 +150,15 @@ describe MergeRequests::RefreshService do } end - it 'create merge request pipeline' do + it 'create merge request pipeline with commits' do expect { subject } .to change { @merge_request.merge_request_pipelines.count }.by(1) .and change { @fork_merge_request.merge_request_pipelines.count }.by(1) - .and change { @another_merge_request.merge_request_pipelines.count }.by(1) + .and change { @another_merge_request.merge_request_pipelines.count }.by(0) + + expect(@merge_request.has_commits?).to be true + expect(@fork_merge_request.has_commits?).to be true + expect(@another_merge_request.has_commits?).to be false end context "when branch pipeline was created before a merge request pipline has been created" do |