-
Notifications
You must be signed in to change notification settings - Fork 1
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
test cases for inter transfer #25
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
+ Coverage 96.56% 98.67% +2.11%
==========================================
Files 5 5
Lines 378 378
==========================================
+ Hits 365 373 +8
+ Misses 13 5 -8 ☔ View full report in Codecov by Sentry. |
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.
I don't think we need to expose these private functions for testing. Check out these docs
https://book.cairo-lang.org/ch10-02-test-organization.html
tests/lib.cairo
Outdated
#[test] | ||
#[should_panic(expected: 'Token ITR is paused')] | ||
fn test_make_transfer_when_paused_neither_minter() { | ||
let (tokenized_bond, minter) = setup_contract_with_minter(); | ||
let from = address_with_tokens(tokenized_bond, minter); | ||
let to = setup_receiver(); | ||
let transfer = setup_transfer(from, to, AMOUNT_TRANSFERRED()); | ||
|
||
start_cheat_caller_address(tokenized_bond.contract_address, OWNER()); | ||
tokenized_bond.pause_inter_transfer(TOKEN_ID()); | ||
|
||
start_cheat_caller_address(tokenized_bond.contract_address, from); | ||
tokenized_bond.make_transfer(transfer); | ||
} |
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.
we already have this same test on 891
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.
Oh damn. I had reviewed that. I totally forgot about it. removing it now
No description provided.