Replace custom query counter with new gem rspec-sql

This commit is contained in:
Maikel Linke
2024-03-01 11:40:39 +11:00
parent 58490c26c1
commit 60b86e1d64
3 changed files with 3 additions and 53 deletions

View File

@@ -132,9 +132,9 @@ module Admin
end
it do
query_counter = QueryCounter.new
get :show, params: { id: order_cycle.id }, as: :json
expect(query_counter.queries).to eq(
expect {
get :show, params: { id: order_cycle.id }, as: :json
}.to query_database(
{
select: {
enterprise_fees: 3,
@@ -151,7 +151,6 @@ module Admin
update: { spree_users: 1 }
}
)
query_counter.stop
end
end
end