Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (31 sloc) 648 Bytes
defmodule Integration.BaseTokenTest do
import Test.Utils
use NamedAccounts
use ExUnit.Case
setup do
Redis.reset()
on_exit(fn ->
Redis.reset()
end)
:ok
end
test "send tokens asynchronously" do
set_balances(%{
@alice => 100,
@bob => 100
})
post(%{
private_key: @alices_private_key,
nonce: 2,
method: :transfer,
params: [@bob, 50]
})
TransactionProcessor.proccess_transactions(1)
TransactionProcessor.wait_until_done()
assert get(%{
private_key: @alices_private_key,
method: :balance_of,
params: [@alice]
}) == 50
end
end