Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michavie committed Jan 7, 2022
1 parent eeeced8 commit a2fad0c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/PreparedTxs/IssueNftCollectionTxBuilderTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Superciety\ElrondSdk\PreparedTxs\IssueNftCollectionTxBuilder;

it('builds a nft collection issue tx', function () {
$input = [
'type' => 'nft',
'name' => 'Test1',
'ticker' => 'Test2',
'properties' => ['canFreeze', 'canWipe'],
];

$actual = (new IssueNftCollectionTxBuilder)
->build($input);

expect($actual->data->data)
->toBe('issueNonFungible@5465737431@5445535432@63616e467265657a65@74727565@63616e57697065@74727565');
});

it('builds a sft collection issue tx', function () {
$input = [
'type' => 'sft',
'name' => 'Test1',
'ticker' => 'Test2',
'properties' => ['canFreeze', 'canWipe'],
];

$actual = (new IssueNftCollectionTxBuilder)
->build($input);

expect($actual->data->data)
->toBe('issueSemiFungible@5465737431@5445535432@63616e467265657a65@74727565@63616e57697065@74727565');
});

0 comments on commit a2fad0c

Please sign in to comment.