Create note on discontinued development
[merb_mart.git] / spec / models / user / customer_spec.rb
blobdb4a98f304e65d32f13dc72ed16f374c8bbffa6b
1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
3 describe Customer do
4   before(:each) do
5     DataMapper.auto_migrate!
6   end
8   describe "associations" do
9     it "should have n orders" do
10       orders = (1..10).of {Order.gen}
11       customer = Customer.create(Customer.gen_attrs.merge(:orders => orders))
12       customer.orders = orders
13       customer.should be_valid
14     end
16     it "should have n addresses" do
17       pending ":through working in DM"
18       addresses = (1..10).of {Address.gen}
19       customer = Customer.create(Customer.gen_attrs.merge(:addresses => addresses))
20       customer.addresses = addresses
21       customer.should be_valid
22     end
24     it "should have n accounts" do
25       pending ":through working in DM"
26       accounts = (1..10).of {Account.gen}
27       customer = Customer.create(Customer.gen_attrs.merge(:accounts => accounts))
28       customer.accounts = accounts
29       customer.should be_valid
30     end
31   end
32 end