Added model test
Added test for physical ticket model.
This commit is contained in:
parent
5c56683ae8
commit
d7678b2fa0
4 changed files with 25 additions and 18 deletions
5
spec/factories/physical_ticket.rb
Normal file
5
spec/factories/physical_ticket.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :physical_ticket do
|
||||
ticket_purchase
|
||||
end
|
||||
end
|
||||
|
|
@ -4,5 +4,11 @@ FactoryGirl.define do
|
|||
conference
|
||||
ticket
|
||||
quantity 10
|
||||
factory :paid_ticket_purchase do
|
||||
after(:build) do |ticket_purchase|
|
||||
payment = create(:payment)
|
||||
ticket_purchase.pay(payment)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue