fix-tenant-scope #159

Merged
bustikiller merged 4 commits from fix-tenant-scope into main 2024-12-02 19:35:36 +00:00
2 changed files with 12 additions and 7 deletions
Showing only changes of commit ef573c5f73 - Show all commits

View File

@ -0,0 +1,3 @@
ActsAsTenant.configure do |config|
config.require_tenant = true
end

View File

@ -2,13 +2,15 @@
NUMBER_OF_GUESTS = 50
TablesArrangement.delete_all
Expense.delete_all
Guest.delete_all
Group.delete_all
Wedding.delete_all
wedding = Wedding.create!(slug: :default, date: 1.year.from_now)
ActsAsTenant.without_tenant do
TablesArrangement.delete_all
Expense.delete_all
Guest.delete_all
Group.delete_all
Wedding.delete_all
wedding = Wedding.create!(slug: :default, date: 1.year.from_now)
end
ActsAsTenant.with_tenant(wedding) do
Expense.create!(name: 'Photographer', amount: 3000, pricing_type: 'fixed')