-
Notifications
You must be signed in to change notification settings - Fork 2
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
Entire test coverage #3
Comments
tdelabro
pushed a commit
that referenced
this issue
Aug 3, 2022
* first build ideas * updated with what we'll show * save working progress * Add subscribe extrinsic * Add unit tests for subscribe extrinsic * PR review working progress * PR review Add unit tests Saving work progress of PR review * PR review #3 Modify tests * PR review Split the mock from the test * fix: format code solved & tests passed * clean: changed u32 type to BlockNumber for block references, additionally removing code complexity * fix: added ensure verification for 'number_of_installment' and for subscription & subscribed accounts * clean: removed unused macro_export * fix: removed feature(is_some_with) unstable macro preventing compilation * fix: remove .idea/ from git files & added it to .gitignore * fix: renamed 'subscribe_call.rs' to 'subscribe.rs', grouped 'mock.rs' & 'subscribe.rs' in a tests module * clean: removed specifications for versions on branches * feat: unsubscribe * enhance: changed Hashing algorithm from Blake2_256 to Twox64Concat for Plans & Subscription types * changed: renamed SubscriptionCreated & UnsubscriptionCreated events * changed: Unsubscription event now holds data on the old subscription * fix: number_of_installment value check in subscribe() * enhance: reduced code for next_block_number getter * changed: rewrote subscriptions vector set value * enhance: wrapped entry values into variables in tests * tests: added subscribe test for number_of_installment with None value * changed: using index instead of iterating in subscription vector for unsubscribe() * tests: added basic unsubscribe test * tests: added edge cases tests for unsubscribe() * changed: temporarily changed weight for subscribe() & unsubscribe() calls to 1000 * clean: tests * changed: using simple add instead of saturating_add() call to get the next block * changed: Subscription event now holds 'number_of_installment' data * changed: now using 'origin' instead of 'subscriber' argument for unsubscribe() * changed: more explicit unsubscribe errors * changed: better error names for unsubscribe() edge cases * changed: now using the 'subscription' variable found in StorageMap for the event trigger at the end of unsubscribe() * clean: code format & clippy solved * changed: removed 'subscriber' from unsubscribe() arguments * clean: removed dead code in tests * removed: SubscriptionAtIndexDoesNotMatch event as we do not compare 'subscription' in arguments anymore Co-authored-by: nathan gd <[email protected]> Co-authored-by: Guillaume Bogard <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: