Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset: Add tests for status_change of asset #409

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Soham-27
Copy link

@Soham-27 Soham-27 commented Mar 30, 2024

this pull makes following changes:
*fixes issue #383

Copy link
Member

@vatsa287 vatsa287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer vc_status_change test implementation, which is almost similar.

@@ -494,4 +584,4 @@ fn asset_vc_status_change_should_succeed() {
AssetStatusOf::INACTIVE
));
});
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Keep the newline at eof ;)

});
}

=======
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required

authorization_id.clone()
));

let new_status = AssetStatus::Locked;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asset status can be either Active, Inactive, Expired. Can see more on this pallets/asset/src/types.rs.

let change_status_digest = <Test as frame_system::Config>::Hashing::hash(
&[&asset_id.encode()[..], &new_status.encode()[..]].concat()[..],
);
assert_ok!(Asset::change_status(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • No extrinsic named change_status but status_change, please refer its implementation present in src/lib.rs.
  • Changing of status does not change its digest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants