add controller tests

This commit is contained in:
Philipp Rothmann 2023-01-05 13:44:20 +01:00
parent 1c2ca42dda
commit 21aa24c010
16 changed files with 1140 additions and 4 deletions

15
spec/factories/invite.rb Normal file
View file

@ -0,0 +1,15 @@
require 'factory_bot'
FactoryBot.define do
factory :invite do
user { create :user }
group { create :group }
email { Faker::Internet.email }
factory :expired_invite do
after :create do |invite|
invite.update_column(:expires_at, Time.now.yesterday)
end
end
end
end