1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-06 01:08:21 +01:00

test invoice wallet amount

This commit is contained in:
Peng DU 2016-07-19 11:37:12 +02:00
parent 50ba15b5bf
commit 85153c201e
3 changed files with 3 additions and 0 deletions

View File

@ -282,6 +282,7 @@ module Reservations
transaction = @vlonchamp.wallet.wallet_transactions.last transaction = @vlonchamp.wallet.wallet_transactions.last
assert_equal transaction.transaction_type, 'debit' assert_equal transaction.transaction_type, 'debit'
assert_equal transaction.amount, 10 assert_equal transaction.amount, 10
assert_equal transaction.amount, invoice.wallet_amount / 100.0
end end
test "user without subscription and with invoicing disabled reserves a machine and pay wallet with success" do test "user without subscription and with invoicing disabled reserves a machine and pay wallet with success" do

View File

@ -361,6 +361,7 @@ module Reservations
transaction = @vlonchamp.wallet.wallet_transactions.last transaction = @vlonchamp.wallet.wallet_transactions.last
assert_equal transaction.transaction_type, 'debit' assert_equal transaction.transaction_type, 'debit'
assert_equal transaction.amount, 10 assert_equal transaction.amount, 10
assert_equal transaction.amount, invoice.wallet_amount / 100.0
end end
end end
end end

View File

@ -140,5 +140,6 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest
transaction = @vlonchamp.wallet.wallet_transactions.last transaction = @vlonchamp.wallet.wallet_transactions.last
assert_equal transaction.transaction_type, 'debit' assert_equal transaction.transaction_type, 'debit'
assert_equal transaction.amount, 10 assert_equal transaction.amount, 10
assert_equal transaction.amount, invoice.wallet_amount / 100.0
end end
end end