This repository has been archived by the owner on Nov 27, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5303777
commit 57358a2
Showing
23 changed files
with
105 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Used by "mix format" | ||
[ | ||
inputs: ["mix.exs", "{lib}/**/*.{ex,exs}"] | ||
inputs: ["mix.exs", "{lib,test}/**/*.{ex,exs}"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 21 additions & 22 deletions
43
test/crypto/transactions/deserializers/multi_signature_registration_test.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
defmodule ArkEcosystem.Crypto.Transactions.Deserializers.MultiSignatureRegistrationTest do | ||
use ExUnit.Case, async: false | ||
alias ArkEcosystem.Crypto.Transactions.Deserializer | ||
alias ArkEcosystem.Test.TestHelper | ||
use ExUnit.Case, async: false | ||
alias ArkEcosystem.Crypto.Transactions.Deserializer | ||
alias ArkEcosystem.Test.TestHelper | ||
|
||
test "should be ok if signed with a passphrase" do | ||
fixture = TestHelper.read_transaction_fixture("multi_signature_registration", "passphrase") | ||
actual = Deserializer.deserialize(fixture) | ||
|
||
assert(actual.version == 1) | ||
assert(actual.network == 23) | ||
assert(actual.type == fixture.data.type) | ||
assert(actual.timestamp == fixture.data.timestamp) | ||
assert(actual.sender_public_key == fixture.data.senderPublicKey) | ||
assert(actual.fee == fixture.data.fee) | ||
assert(actual.amount == fixture.data.amount) | ||
assert(actual.id == fixture.data.id) | ||
assert(actual.signature == fixture.data.signature) | ||
assert(actual.sign_signature == fixture.data.signSignature) | ||
assert(actual.signatures == fixture.data.signatures) | ||
assert(actual.asset.multisignature.keysgroup == fixture.data.asset.multisignature.keysgroup) | ||
assert(actual.asset.multisignature.min == fixture.data.asset.multisignature.min) | ||
assert(actual.asset.multisignature.lifetime == fixture.data.asset.multisignature.lifetime) | ||
end | ||
test "should be ok if signed with a passphrase" do | ||
fixture = TestHelper.read_transaction_fixture("multi_signature_registration", "passphrase") | ||
actual = Deserializer.deserialize(fixture) | ||
|
||
assert(actual.version == 1) | ||
assert(actual.network == 23) | ||
assert(actual.type == fixture.data.type) | ||
assert(actual.timestamp == fixture.data.timestamp) | ||
assert(actual.sender_public_key == fixture.data.senderPublicKey) | ||
assert(actual.fee == fixture.data.fee) | ||
assert(actual.amount == fixture.data.amount) | ||
assert(actual.id == fixture.data.id) | ||
assert(actual.signature == fixture.data.signature) | ||
assert(actual.sign_signature == fixture.data.signSignature) | ||
assert(actual.signatures == fixture.data.signatures) | ||
assert(actual.asset.multisignature.keysgroup == fixture.data.asset.multisignature.keysgroup) | ||
assert(actual.asset.multisignature.min == fixture.data.asset.multisignature.min) | ||
assert(actual.asset.multisignature.lifetime == fixture.data.asset.multisignature.lifetime) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.