diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-06-07 10:01:52 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-06-07 10:01:52 +0000 |
commit | 4b086b74509500998bdc28a82871aa2c9003a194 (patch) | |
tree | 24ae22da7dda0e328981c355417f691568f8f2b5 /spec/migrations | |
parent | fd19f887dfeeeedb483c4a4fb32f9f768e89389c (diff) | |
parent | b8704dce72fd8992b1f785c0ffa2f2c0eab81334 (diff) | |
download | gitlab-ce-4b086b74509500998bdc28a82871aa2c9003a194.tar.gz |
Merge branch '62418-project-default-git-depth' into 'master'
Add project level git depth setting
Closes #59688
See merge request gitlab-org/gitlab-ce!28919
Diffstat (limited to 'spec/migrations')
-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) } |