From 858735b5dab1b3d322f4fcc0f8c956c1a527d4a1 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 15 May 2020 15:00:04 +0800 Subject: [PATCH] DEV: Fix broken test due to 9ab5801a1bc5bfc505673d0c74f1a3c1e6c28461. --- spec/lib/backup_restore/database_restorer_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/lib/backup_restore/database_restorer_spec.rb b/spec/lib/backup_restore/database_restorer_spec.rb index 9f1cc0c935b..8a7b9ec8a94 100644 --- a/spec/lib/backup_restore/database_restorer_spec.rb +++ b/spec/lib/backup_restore/database_restorer_spec.rb @@ -155,7 +155,7 @@ describe BackupRestore::DatabaseRestorer do context "readonly functions" do before do - Migration::SafeMigrate.stubs(:post_migration_path).returns("spec/fixtures/db/post_migrate") + Migration::SafeMigrate.stubs(:post_migration_path).returns("spec/fixtures/db/post_migrate/drop_column") end it "doesn't try to drop function when no functions have been created" do @@ -164,12 +164,10 @@ describe BackupRestore::DatabaseRestorer do end it "creates and drops all functions when none exist" do - Migration::BaseDropper.expects(:create_readonly_function).with(:email_logs, nil) Migration::BaseDropper.expects(:create_readonly_function).with(:posts, :via_email) Migration::BaseDropper.expects(:create_readonly_function).with(:posts, :raw_email) execute_stubbed_restore(stub_readonly_functions: false) - Migration::BaseDropper.expects(:drop_readonly_function).with(:email_logs, nil) Migration::BaseDropper.expects(:drop_readonly_function).with(:posts, :via_email) Migration::BaseDropper.expects(:drop_readonly_function).with(:posts, :raw_email) subject.clean_up