1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
3 describe Mart::Order do
6 @order = Mart::Order.new
9 describe "associations" do
10 it "should have an account"
11 it "should have a billing address"
12 it "should have a shipping address"
15 it "should be valid" do
16 @order.order_number = 23
17 @order.should be_valid
20 it "should have a total"
22 describe "class methods" do
24 it "should return a search result" do
28 it "should generate an order number" do
29 Mart::Order.generate_order_number
34 it "should get totals"
36 it "should get CSV for orders" do
37 order1 = Mart::Order.new
38 order2 = Mart::Order.new
39 order_list = Array.new
40 #order_list << [order1, order2]
41 order_list << Mart::Order.new
42 order_list << Mart::Order.new
43 order_list.should_not == nil
44 @csv = Mart::Order.get_csv_for_orders(order_list)
47 it "should get XML for orders" do
50 order_list = Array.new
51 order_list << Mart::Order.new
52 order_list << Mart::Order.new
53 order_list.should_not == nil
54 @xml = Mart::Order.get_xml_for_orders(order_list)
57 it "should get order status"
61 it "should assign line items from a hash"
63 it "should get the total amount of all line items associated with this order"
65 it "should test weight"
67 it "should connect to FedEx to get shipping prices"
69 it "should work for a valid transaction"
70 it "should not work for an invalid transaction"
73 it "should not cleanup"
75 it "should belong to an order account"
77 it "should belong to an order user"
79 it "should belong to an order shipping type"
81 it "should belong to an order status code"
83 it "should belong to a promotion"
85 it "should have a unique order number"