Skip to content

Commit

Permalink
Add missing create asset to commands validator test
Browse files Browse the repository at this point in the history
Signed-off-by: kamilsa <[email protected]>
  • Loading branch information
kamilsa authored and lebdron committed Dec 19, 2017
1 parent 7dede15 commit 5c048f8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ TEST(CommandsValidatorTest, StatelessValidTest) {
std::string valid_role_name = "user";
std::string valid_account_name = "admin";
std::string valid_domain_id = "ru";
uint8_t valid_precision = 42;
std::vector<RolePermission> valid_role_permissions;
iroha::protocol::GrantablePermission valid_grantable_permission =
iroha::protocol::GrantablePermission ::can_add_my_signatory;
Expand Down Expand Up @@ -256,6 +257,10 @@ TEST(CommandsValidatorTest, StatelessValidTest) {
generateCreateAccount(
valid_account_name, valid_domain_id, valid_public_key));

// Create Asset
payload->add_commands()->mutable_create_asset()->CopyFrom(generateCreateAsset(
valid_account_name, valid_domain_id, valid_precision));

// Create Domain
payload->add_commands()->mutable_create_domain()->CopyFrom(
generateCreateDomain(valid_domain_id, valid_role_name));
Expand Down Expand Up @@ -313,6 +318,7 @@ TEST(CommandsValidatorTest, StatelessInvalidTest) {
payload->add_commands()->mutable_add_signatory()->CopyFrom(AddSignatory());
payload->add_commands()->mutable_append_role()->CopyFrom(AppendRole());
payload->add_commands()->mutable_create_account()->CopyFrom(CreateAccount());
payload->add_commands()->mutable_create_asset()->CopyFrom(CreateAsset());
payload->add_commands()->mutable_create_domain()->CopyFrom(CreateDomain());
payload->add_commands()->mutable_create_role()->CopyFrom(CreateRole());
payload->add_commands()->mutable_grant_permission()->CopyFrom(
Expand All @@ -329,5 +335,5 @@ TEST(CommandsValidatorTest, StatelessInvalidTest) {

// in total there should be 13 reasons of bad answer: 12 for each command + 1
// for transaction metadata
ASSERT_EQ(answer.getReasonsMap().size(), 13);
ASSERT_EQ(answer.getReasonsMap().size(), 14);
}

0 comments on commit 5c048f8

Please sign in to comment.