foodsoft/spec/factories/invite.rb
Philipp Rothmann d7591d46b9 Add controller tests
Co-authored-by: viehlieb <pf@pragma-shift.net>
Co-authored-by: Tobias Kneuker <tk@pragma-shift.net>

seperate expects

refactor login user calls

add more articles to test sorting with

fix: fix test for rails upgrade
2023-01-17 16:09:52 +01:00

15 lines
309 B
Ruby

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