-
Notifications
You must be signed in to change notification settings - Fork 7
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
voting-contract: tests #8
Conversation
78d7bf3
to
b2408ae
Compare
Open question: if some of these tests are copied from |
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.
Just commenting in-between to not have too much at the end. Some comments, but not strongly relevant, just my recent thoughts.
Also tests for voting and executing are missing and they are very important, but I assume it is a reason why it is still in draft.
0d355db
to
551136a
Compare
Rebased. |
Only missing tests for the various queries now. |
No execution tests because there is no execution logic to test in |
74463a8
to
1133f73
Compare
Did you intend to force-push to this branch? |
Apparently this was just a rebase. Review away! |
Ups, sorry about that. I'll review this tomorrow, first thing in the morning. I was taking a look while developing my changes, and this looks pretty good. |
Just merged #18 in here. If you wanted to add a couple more execute tests, now is when. |
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.
Pretty good.
mod voting; | ||
|
||
#[test] | ||
fn simple_instantiate() { |
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.
Why this test? In any case, it shouldn't assert something?
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.
It will fail if the contract fails to instantiate, which includes the library instantiate
fn. Sure, it's tested by literally every other test we have, but I figured it can be helpful when trying to isolate a bug.
Closes #6