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
This commit is contained in:
parent
d16aa19300
commit
d7591d46b9
13 changed files with 932 additions and 16 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
|
||||
8
spec/factories/order_article.rb
Normal file
8
spec/factories/order_article.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
require 'factory_bot'
|
||||
|
||||
FactoryBot.define do
|
||||
factory :order_article do
|
||||
order { create :order }
|
||||
article { create :article }
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue