Skip to content

Commit

Permalink
✅ Mock find_or_schedule_jobs in account endpoints spec
Browse files Browse the repository at this point in the history
The account endpoints spec was failing because it attempted to
schedule jobs before the tenant schema was created. By mocking
find_or_schedule_jobs in this specific test, we avoid the schema
error while preserving the actual job scheduling behavior in other
tests.
  • Loading branch information
Shana Moore committed Jan 25, 2025
1 parent decf3cd commit e4695b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec/features/accounts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
allow(Apartment::Tenant).to receive(:switch).with(account.tenant) do |&block|
block.call
end
allow_any_instance_of(Account).to receive(:find_or_schedule_jobs)
end

around do |example|
Expand Down

0 comments on commit e4695b4

Please sign in to comment.