Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed Jan 29, 2021
1 parent 279e1ca commit 97485e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spec/byron_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,15 @@ def test_byron_tx(source_wid, target_wid)
it "I could calculate migration cost" do
id = create_byron_wallet "icarus"
cost = BYRON.migrations.cost(id)
expect(cost.code).to eq 403
expect(cost.code).to eq 501
end

it "I could migrate all my funds" do
id = create_byron_wallet "random"
target_wal_id = create_byron_wallet "icarus"
addresses = BYRON.addresses.list(target_wal_id).map{ |a| a['id'] }
migr = BYRON.migrations.migrate(id, PASS, addresses)
expect(migr.code).to eq 403
expect(migr.code).to eq 501
end
end
end
14 changes: 7 additions & 7 deletions spec/shelley_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
pool_id = pools.list({stake: 1000})[0]['id']

join = pools.join(pool_id, id, PASS)
expect(join).to include "cannot_cover_fee"
expect(join).to include "not_enough_money"
expect(join.code).to eq 403
end

Expand Down Expand Up @@ -338,7 +338,7 @@
action_join = {action: "join", pool: pid}

rnd = SHELLEY.coin_selections.random_deleg wid, action_join
expect(rnd).to include "cannot_cover_fee"
expect(rnd).to include "not_enough_money"
expect(rnd.code).to eq 403
end

Expand Down Expand Up @@ -676,7 +676,7 @@

pools = SHELLEY.stake_pools
fees = pools.delegation_fees(id)
expect(fees).to include "cannot_cover_fee"
expect(fees).to include "not_enough_money"
expect(fees.code).to eq 403
end
end
Expand All @@ -689,17 +689,17 @@
it "I could calculate migration cost" do
id = create_shelley_wallet
cost = SHELLEY.migrations.cost(id)
expect(cost).to include "nothing_to_migrate"
expect(cost.code).to eq 403
expect(cost).to include "not_implemented"
expect(cost.code).to eq 501
end

it "I could migrate all my funds" do
id = create_shelley_wallet
target_id = create_shelley_wallet
addrs = SHELLEY.addresses.list(target_id).map{ |a| a['id'] }
migr = SHELLEY.migrations.migrate(id, PASS, addrs)
expect(migr).to include "nothing_to_migrate"
expect(migr.code).to eq 403
expect(migr).to include "not_implemented"
expect(migr.code).to eq 501
end
end

Expand Down

0 comments on commit 97485e8

Please sign in to comment.