spec/factories/item_factories.rb in artfully_ose-1.2.0 vs spec/factories/item_factories.rb in artfully_ose-1.3.0.pre1
- old
+ new
@@ -1,8 +1,9 @@
FactoryGirl.define do
factory :item do
product { FactoryGirl.create(:sold_ticket) }
+ # ticket state is 'purchased'
order
reseller_net 100
end
factory :fully_discounted_item, :parent => :item do
@@ -36,16 +37,37 @@
end
factory :exchangee_item, :class => Item do
product { FactoryGirl.create(:ticket, :state => :sold) }
after(:build) do |i|
- i.state="exchangee"
+ i.state="settled"
end
end
factory :refunded_item, :class => Item do
product { FactoryGirl.create(:ticket, :state => :on_sale) }
after(:build) do |i|
i.state="refunded"
+ end
+ end
+
+ factory :refund_item, :class => Item do
+ product { FactoryGirl.create(:ticket, :state => :on_sale) }
+ after(:build) do |i|
+ i.state="refund"
+ end
+ end
+
+ factory :item_view do
+ product_type 'Ticket'
+ organization { FactoryGirl.create(:organization) }
+ person { FactoryGirl.create(:person) }
+ created_at Time.now
+ end
+
+ factory :purchased_membership_item, :class => Item do
+ product { create(:membership, :current) }
+ after(:build) do |i|
+ i.state="purchased"
end
end
end