Skip to content

Commit

Permalink
invalid index expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrage committed Nov 17, 2023
1 parent 2ff7823 commit 68a0ae8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/safe_statements_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,10 @@ def up
end

expect(ActiveRecord::Base.connection.indexes(:foos3_child2)).to be_empty

expect(ActiveRecord::Base.pluck_from_sql("SELECT indexrelid::regclass FROM pg_index WHERE NOT indisvalid")).to contain_exactly(
"index_foos3_on_updated_at",
)
end
end

Expand Down Expand Up @@ -1981,6 +1985,11 @@ def up
end

expect(ActiveRecord::Base.connection.indexes(:foos3_sub_child2)).to be_empty

expect(ActiveRecord::Base.pluck_from_sql("SELECT indexrelid::regclass FROM pg_index WHERE NOT indisvalid")).to contain_exactly(
"index_foos3_on_updated_at",
"index_foos3_sub_on_updated_at",
)
end
end

Expand Down

0 comments on commit 68a0ae8

Please sign in to comment.