DEV: Fix broken test due to 9ab5801a1b.

This commit is contained in:
Guo Xiang Tan 2020-05-15 15:00:04 +08:00
parent 9ab5801a1b
commit 858735b5da
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 1 additions and 3 deletions

View File

@ -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