Archiving and disabling old checkout spec

This commit is contained in:
Will Marshall
2014-03-19 14:34:51 +11:00
parent dc8418cb4c
commit 09e6caf039
2 changed files with 51 additions and 1 deletions

View File

@@ -0,0 +1,50 @@
Checkout:
it "displays correct distribution charges on checkout"
it "sends a confirmation email on successful checkout"
it "copies the addresses from a previous order" (controller test)
Cart:
it "displays correct distribution charges on the cart"
Shop:
it "shows nothing when there is no future order cycle"
scenario "order cycle expires mid-order" (see below)
it "does not allow the user to add a product from a distributor that cannot supply the cart's products"
add_to_cart_spec:
adapt: scenario "adding a product to the cart for a group buy"
adapt: scenario "adding a product with variants to the cart for a group buy"
adapt: scenario "adding a product to cart that is not a group buy does not show max quantity field" do
adapt: scenario "adding a product with a max quantity less than quantity results in max_quantity==quantity" do
scenario "order cycle expires mid-order" do
d = create(:distributor_enterprise,
name: 'Green Grass', email: 'd@example.com', phone: '1029 3847')
create_enterprise_group_for d
p = create(:simple_product)
oc = create(:simple_order_cycle, name: 'oc', distributors: [d], variants: [p.master])
# When I select an order cycle and add a product to my cart
visit spree.root_path
click_link 'Green Grass'
visit enterprise_path d
click_link p.name
click_button 'Add To Cart'
# And the order cycle expires and I load a page
Timecop.travel(oc.orders_close_at + 1.day) do
visit enterprise_path d
# Then I should see an expiry message
page.should have_content "Sorry, orders for this order cycle closed 1 day ago! Please contact your hub directly to see if they can accept late orders."
page.should have_content d.email
page.should have_content d.phone
end
end