Skip to content

Commit

Permalink
Update e2e tests with migration plan endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed May 4, 2021
1 parent b80e5a0 commit 08430c6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/e2e/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'cardano_wallet', '~> 0.3.4'
gem 'cardano_wallet', '~> 0.3.5'
# gem 'cardano_wallet', path: "~/wb/cardano_wallet"
gem 'bip_mnemonic', '0.0.4'
gem 'rake', '12.3.3'
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/Gemfile.lock
Expand Up @@ -2,7 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
bip_mnemonic (0.0.4)
cardano_wallet (0.3.4)
cardano_wallet (0.3.5)
httparty (~> 0.18.0)
diff-lcs (1.4.4)
httparty (0.18.1)
Expand Down Expand Up @@ -32,7 +32,7 @@ PLATFORMS

DEPENDENCIES
bip_mnemonic (= 0.0.4)
cardano_wallet (~> 0.3.4)
cardano_wallet (~> 0.3.5)
rake (= 12.3.3)
rspec (= 3.10.0)

Expand Down
18 changes: 15 additions & 3 deletions test/e2e/spec/byron_spec.rb
Expand Up @@ -266,10 +266,22 @@
teardown
end

it "I could calculate migration cost" do
it "I could create migration plan - icarus" do
id = create_byron_wallet "icarus"
cost = BYRON.migrations.cost(id)
expect(cost).to be_correct_and_respond 501
target_id = create_shelley_wallet
addrs = SHELLEY.addresses.list(target_id).map { |a| a['id'] }

plan = BYRON.migrations.plan(id, addrs)
expect(plan).to be_correct_and_respond 501
end

it "I could create migration plan - random" do
id = create_byron_wallet "random"
target_id = create_shelley_wallet
addrs = SHELLEY.addresses.list(target_id).map { |a| a['id'] }

plan = BYRON.migrations.plan(id, addrs)
expect(plan).to be_correct_and_respond 501
end

it "I could migrate all my funds" do
Expand Down
11 changes: 7 additions & 4 deletions test/e2e/spec/shelley_spec.rb
Expand Up @@ -332,11 +332,14 @@
teardown
end

it "I could calculate migration cost" do
it "I could create migration plan" do
id = create_shelley_wallet
cost = SHELLEY.migrations.cost(id)
expect(cost).to be_correct_and_respond 501
expect(cost.to_s).to include "not_implemented"
target_id = create_shelley_wallet
addrs = SHELLEY.addresses.list(target_id).map { |a| a['id'] }

plan = SHELLEY.migrations.plan(id, addrs)
expect(plan).to be_correct_and_respond 501
expect(plan.to_s).to include "not_implemented"
end

it "I could migrate all my funds" do
Expand Down

0 comments on commit 08430c6

Please sign in to comment.