1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
3 describe Mart::Customer do
5 describe "associations" do
7 it "should have orders"
8 it "should have one last order"
9 it "should have many addresses"
10 it "should have many accounts"
12 it "should have wishlist items"
13 it "should have items" # ??
17 describe "email address" do
19 it "should require an email address" do
20 customer = Mart::Customer.new
22 customer.errors.on(:email).should_not be_nil
25 it "should require an email address to be less than least 255"
26 it "should require an email address to be unique"
27 it "should require a valid email address"
31 it "should have an authenticate method"
33 #it "should generate a random password" do
34 # password = Customer.generate_password
35 # password.should_not be_nil
36 # password.length.should == 8
39 #it "should generate a random password of 15 characters" do
40 # password = Customer.generate_password(15)
41 # password.should_not be_nil
42 # password.length.should == 15
45 it "should provide the last billing address"
46 it "should provide the last shipping address"
47 it "should provide the last order account"
49 #it "should have a reset_password method"
50 #it "should have an add_item_to_wishlist method"
51 #it "should have a remove_item_from_wishlist method"