Skip to content

Commit

Permalink
fixup! fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavSokov committed Jul 19, 2024
1 parent 11f72ff commit 1ead230
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def down
post :rollback, params: { id: "20130906111513", database: "tmp/primary.sqlite3" }
assert_response :redirect
get :index
assert_select ".flash",
text: "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration"
message = "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration"
assert_select ".flash", text: message
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def down
post :rollback, params: { id: "20130906111513", database: "tmp/primary.sqlite3" }
assert_response :redirect
get :index
assert_select ".flash",
text: "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration"
message = "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration"
assert_select ".flash", text: message
end

test "POST #rollback_all changes all phantom migrations status to down and hide migration with down status" do
Expand Down
11 changes: 3 additions & 8 deletions test/dummy_app/config/database.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
test:
primary:
adapter: sqlite3
database: tmp/primary.sqlite3
migrations_paths: "/home/vlad/projects/actual_db_schema/test/dummy_app/db/migrate"
secondary:
adapter: sqlite3
database: tmp/secondary.sqlite3
migrations_paths: "/home/vlad/projects/actual_db_schema/test/dummy_app/db/migrate_secondary"
adapter: sqlite3
database: tmp/primary.sqlite3
migrations_paths: "/home/vlad/projects/actual_db_schema/test/dummy_app/db/migrate"

0 comments on commit 1ead230

Please sign in to comment.