-
Notifications
You must be signed in to change notification settings - Fork 95
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 | |||
)); | |||
}); | |||
} | |||
} |
There was a problem hiding this comment.
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 ;)
}); | ||
} | ||
|
||
======= |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
butstatus_change
, please refer its implementation present in src/lib.rs. - Changing of status does not change its digest.
this pull makes following changes:
*fixes issue #383