Skip to content

Commit

Permalink
Adjust e2e tests after API changes from #3249
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed May 4, 2022
1 parent 0fabfd4 commit 58dbe4a
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions test/e2e/spec/e2e_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -621,32 +621,18 @@ def fingerprint

describe "Minting and Burning" do
def mint(asset_name, quantity, policy_script, address = nil)
mint = {
'operation' => {
'mint' =>
{
'amount' => { 'quantity' => quantity,
'unit' => 'assets'
}
}
},
'policy_script_template' => policy_script
}
mint = { 'operation' => { 'mint' => { 'quantity' => quantity } },
'policy_script_template' => policy_script
}
mint['operation']['mint']['receiving_address'] = address unless address == nil
mint['asset_name'] = asset_name unless asset_name == nil
mint
end

def burn(asset_name, quantity, policy_script)
burn = {
'operation' => {
'burn' => { 'quantity' => quantity,
'unit' => 'assets'
}

},
'policy_script_template' => policy_script
}
burn = { 'operation' => { 'burn' => { 'quantity' => quantity } },
'policy_script_template' => policy_script
}
burn['asset_name'] = asset_name unless asset_name == nil
burn
end
Expand All @@ -670,6 +656,7 @@ def get_policy_id_from_decode(tx_decoded_mint_or_burn)
# Tx2: Burns 3 x 500 of each and verifies 500 of each remain on wallet
# Tx3: Burns remaining 3 x 500 and verifies they're no longer on balance
it "Can mint and then burn" do
pending "ADP-1738"
src_before = get_shelley_balances(@wid)
address = SHELLEY.addresses.list(@wid).first['id']
policy_script1 = 'cosigner#0'
Expand Down Expand Up @@ -772,6 +759,7 @@ def get_policy_id_from_decode(tx_decoded_mint_or_burn)
# Tx1: Mints 3 x 1 assets with metadata
# Tx2: Burns 3 x 1 assets and also assign metadata to tx
it "Can mint and burn with metadata" do
pending "ADP-1738"
src_before = get_shelley_balances(@wid)
address = SHELLEY.addresses.list(@wid).first['id']
policy_script1 = 'cosigner#0'
Expand Down Expand Up @@ -855,6 +843,7 @@ def get_policy_id_from_decode(tx_decoded_mint_or_burn)
# Tx2: Mints 500 more of A1 and burns 500 of A2 => A1 = 1000, A2 = 0
# Tx3: Burns remaining 1000 of A1 => A1 = 0, A2 = 0
it "Can mint and burn in the same tx" do
pending "ADP-1738"
src_before = get_shelley_balances(@wid)
address = SHELLEY.addresses.list(@wid).first['id']
policy_script1 = { "some" => {"at_least" => 1, "from" => [ "cosigner#0" ]} }
Expand Down

0 comments on commit 58dbe4a

Please sign in to comment.