spec/integration/transaction_spec.rb in recurly-0.4.0 vs spec/integration/transaction_spec.rb in recurly-0.4.1
- old
+ new
@@ -63,11 +63,12 @@
it "should create one transaction after registering" do
@transactions.count.should eql(1)
end
it "should be in void state" do
- @transactions.first.amount_in_cents.should == 0
+ @transactions.first.amount_in_cents.should == 100
+ @transactions.first.status.should == 'void'
end
end
context "with transactions" do
use_vcr_cassette "transaction/list-filled/#{timestamp}"
@@ -77,13 +78,15 @@
Factory.create_transaction account.account_code, :amount_in_cents => 100, :description => "one"
Factory.create_transaction account.account_code, :amount_in_cents => 200, :description => "two"
Factory.create_transaction account.account_code, :amount_in_cents => 300, :description => "three"
@successful_transactions = Transaction.list_for_account(account.account_code, :success)
+ @total_transactions = Transaction.list_for_account(account.account_code)
end
it "should return a list of transactions made on the account" do
- @successful_transactions.length.should == 4
+ @successful_transactions.length.should == 3
+ @total_transactions.length.should == 4
end
it "should also be available via Account#transactions" do
account.transactions(:success).should == @successful_transactions
end