diff options
Diffstat (limited to 'spec/migrations/remove_orphaned_label_links_spec.rb')
-rw-r--r-- | spec/migrations/remove_orphaned_label_links_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/migrations/remove_orphaned_label_links_spec.rb b/spec/migrations/remove_orphaned_label_links_spec.rb index 13b8919343e..e8c44c141c3 100644 --- a/spec/migrations/remove_orphaned_label_links_spec.rb +++ b/spec/migrations/remove_orphaned_label_links_spec.rb @@ -10,6 +10,12 @@ describe RemoveOrphanedLabelLinks, :migration do let(:project) { create(:project) } # rubocop:disable RSpec/FactoriesInMigrationSpecs let(:label) { create_label } + before do + # This migration was created before we introduced ProjectCiCdSetting#default_git_depth + allow_any_instance_of(ProjectCiCdSetting).to receive(:default_git_depth).and_return(nil) + allow_any_instance_of(ProjectCiCdSetting).to receive(:default_git_depth=).and_return(0) + end + context 'add foreign key on label_id' do let!(:label_link_with_label) { create_label_link(label_id: label.id) } let!(:label_link_without_label) { create_label_link(label_id: nil) } |