summaryrefslogtreecommitdiff
path: root/spec/migrations
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-06-07 00:04:56 +1200
committerKrasimir Angelov <kangelov@gitlab.com>2019-06-07 00:04:56 +1200
commitc0a812ecb74f1fd519d096d8be36f0a2436adc94 (patch)
tree3e22ad23f4fa99c57233e60dfc82f83e7d374fdf /spec/migrations
parent280ac894d203a040c49cc191038fa4c51eb4e174 (diff)
downloadgitlab-ce-c0a812ecb74f1fd519d096d8be36f0a2436adc94.tar.gz
Fix migration specs using factories
We need to stub default_git_depth and default_git_depth= because some old migrations specs try to create a record using schema before that column was introduced.
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/remove_orphaned_label_links_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/migrations/remove_orphaned_label_links_spec.rb b/spec/migrations/remove_orphaned_label_links_spec.rb
index 4c8135cd08c..e8c44c141c3 100644
--- a/spec/migrations/remove_orphaned_label_links_spec.rb
+++ b/spec/migrations/remove_orphaned_label_links_spec.rb
@@ -12,8 +12,8 @@ describe RemoveOrphanedLabelLinks, :migration do
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(true)
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