Skip to content

Commit 5864d29

Browse files
committed
fixed bank transaction test based on new save, save! functionality
1 parent 910a7ba commit 5864d29

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/acceptance/about_creating_bank_transactions_test.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,24 @@ def any_line_items(account)
149149
}]
150150
end
151151

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

158158
assert_raise Xeroizer::ApiException do
159-
new_account.save
159+
new_account.save!
160160
end
161161
end
162+
163+
it "returns false when you try and create a new bank account with a missing account type with save method" do
164+
new_account = client.Account.build(
165+
:name => "Example bank account",
166+
:code => "ACC-001"
167+
)
168+
169+
assert new_account.save == false, "Account save method expected to return false"
170+
171+
end
162172
end

0 commit comments

Comments
 (0)