1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-08 02:54:18 +01:00
fab-manager/test/models/wallet_transaction_test.rb
2016-07-21 16:32:54 +02:00

14 lines
414 B
Ruby

require 'test_helper'
class WalletTransactionTest < ActiveSupport::TestCase
test 'transaction type must be credit or debit' do
transaction = WalletTransaction.new amount: 5
transaction.transaction_type = 'credit'
assert transaction.valid?
transaction.transaction_type = 'debit'
assert transaction.valid?
transaction.transaction_type = 'other'
assert_not transaction.valid?
end
end