Skip to content

Commit

Permalink
fixed bank transaction test based on new save, save! functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaus committed Mar 7, 2018
1 parent 910a7ba commit 5864d29
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/acceptance/about_creating_bank_transactions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,24 @@ def any_line_items(account)
}]
end

it "fails with ApiException when you try and create a new bank account with missing account type" do
it "fails with ApiException when you try and create a new bank account with missing account type with save! method" do
new_account = client.Account.build(
:name => "Example bank account",
:code => "ACC-001"
)

assert_raise Xeroizer::ApiException do
new_account.save
new_account.save!
end
end

it "returns false when you try and create a new bank account with a missing account type with save method" do
new_account = client.Account.build(
:name => "Example bank account",
:code => "ACC-001"
)

assert new_account.save == false, "Account save method expected to return false"

end
end

0 comments on commit 5864d29

Please sign in to comment.