add controller tests
This commit is contained in:
parent
1c2ca42dda
commit
21aa24c010
16 changed files with 1140 additions and 4 deletions
15
spec/factories/invite.rb
Normal file
15
spec/factories/invite.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue