From 85153c201ecb2fdb8802fc783bdc7021563ffc28 Mon Sep 17 00:00:00 2001 From: Peng DU Date: Tue, 19 Jul 2016 11:37:12 +0200 Subject: [PATCH] test invoice wallet amount --- test/integration/reservations/create_as_admin_test.rb | 1 + test/integration/reservations/create_test.rb | 1 + test/integration/subscriptions/create_as_user_test.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/test/integration/reservations/create_as_admin_test.rb b/test/integration/reservations/create_as_admin_test.rb index 046d166bb..af3e59243 100644 --- a/test/integration/reservations/create_as_admin_test.rb +++ b/test/integration/reservations/create_as_admin_test.rb @@ -282,6 +282,7 @@ module Reservations transaction = @vlonchamp.wallet.wallet_transactions.last assert_equal transaction.transaction_type, 'debit' assert_equal transaction.amount, 10 + assert_equal transaction.amount, invoice.wallet_amount / 100.0 end test "user without subscription and with invoicing disabled reserves a machine and pay wallet with success" do diff --git a/test/integration/reservations/create_test.rb b/test/integration/reservations/create_test.rb index 6648a7cd6..c55f528df 100644 --- a/test/integration/reservations/create_test.rb +++ b/test/integration/reservations/create_test.rb @@ -361,6 +361,7 @@ module Reservations transaction = @vlonchamp.wallet.wallet_transactions.last assert_equal transaction.transaction_type, 'debit' assert_equal transaction.amount, 10 + assert_equal transaction.amount, invoice.wallet_amount / 100.0 end end end diff --git a/test/integration/subscriptions/create_as_user_test.rb b/test/integration/subscriptions/create_as_user_test.rb index 0397dd85a..1d3907438 100644 --- a/test/integration/subscriptions/create_as_user_test.rb +++ b/test/integration/subscriptions/create_as_user_test.rb @@ -140,5 +140,6 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest transaction = @vlonchamp.wallet.wallet_transactions.last assert_equal transaction.transaction_type, 'debit' assert_equal transaction.amount, 10 + assert_equal transaction.amount, invoice.wallet_amount / 100.0 end end