1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
3 describe Accounts::BaseAccount do
5 describe "associations" do
6 it "should have an order account type"
7 it "should have an order"
8 it "should belong to a customer (OrderUser)"
11 it "should have a list of months" do
12 months = Accounts::BaseAccount.months
13 months.should_not == nil
14 months.empty?.should == false
15 months.length.should == 12
17 months.first.should == 1
18 months.at(6).should == 7
19 months.last.should == 12
22 it "should have a list of the next 10 years" do
23 years = Accounts::BaseAccount.years
24 years.should_not == nil
25 years.empty?.should == false
26 years.length.should == 10
28 years.first.should == Date.today.year
29 years.at(5).should == Date.today.year + 5
30 years.last.should == Date.today.year + 9
33 #it "should clear personal information" do
34 # order_account = Accounts::BaseAccount.new
35 # order_account.cc_number = '02301033012102010102'
39 #it "should crypt cc_number" do
40 # order_account = Accounts::BaseAccount.new
43 #it "should crypt account_number" do
44 # order_account = Accounts::BaseAccount.new
47 #it "should get_unencrypted_number" do
48 # order_account = Accounts::BaseAccount.new
51 #it "should set unencrypted number" do
52 # order_account = Accounts::BaseAccount.new