diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/services/design_management/save_designs_service_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/services/design_management/save_designs_service_spec.rb')
-rw-r--r-- | spec/services/design_management/save_designs_service_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/services/design_management/save_designs_service_spec.rb b/spec/services/design_management/save_designs_service_spec.rb index 5bc763cc95e..b76c91fbac9 100644 --- a/spec/services/design_management/save_designs_service_spec.rb +++ b/spec/services/design_management/save_designs_service_spec.rb @@ -177,6 +177,18 @@ RSpec.describe DesignManagement::SaveDesignsService do end end + context 'when HEAD branch is different from master' do + before do + stub_feature_flags(main_branch_over_master: true) + end + + it 'does not raise an exception during update' do + run_service + + expect { run_service }.not_to raise_error + end + end + context 'when a design is being updated' do before do run_service @@ -343,7 +355,7 @@ RSpec.describe DesignManagement::SaveDesignsService do path = File.join(build(:design, issue: issue, filename: filename).full_path) design_repository.create_if_not_exists design_repository.create_file(user, path, 'something fake', - branch_name: 'master', + branch_name: project.default_branch_or_main, message: 'Somehow created without being tracked in db') end |