diff options
author | Sean McGivern <sean@gitlab.com> | 2018-07-10 17:00:13 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-07-10 17:06:20 +0300 |
commit | 57fc7cd8f35525f772d7c59a2aa45c96467cb882 (patch) | |
tree | 12123ad5d95b5bd5b3335996cbe398f27d9780c1 /spec/models | |
parent | 3d4873fa64c833c71ab7ee274002d854eb93ef96 (diff) |
Make sure ConflictsService does not raise for conflicting submodules
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/repository_spec.rb | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index d060ab923d1..caf5d829d21 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -431,6 +431,18 @@ describe Repository do it { is_expected.to be_falsey } end + + context 'non merged branch' do + subject { repository.merged_to_root_ref?('fix') } + + it { is_expected.to be_falsey } + end + + context 'non existent branch' do + subject { repository.merged_to_root_ref?('non_existent_branch') } + + it { is_expected.to be_nil } + end end describe '#can_be_merged?' do @@ -452,17 +464,11 @@ describe Repository do it { is_expected.to be_falsey } end - context 'non merged branch' do - subject { repository.merged_to_root_ref?('fix') } + context 'submodule changes that confuse rugged' do + subject { repository.can_be_merged?('update-gitlab-shell-v-6-0-1', 'update-gitlab-shell-v-6-0-3') } it { is_expected.to be_falsey } end - - context 'non existent branch' do - subject { repository.merged_to_root_ref?('non_existent_branch') } - - it { is_expected.to be_nil } - end end describe '#commit' do |