-
Notifications
You must be signed in to change notification settings - Fork 31
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
add : test for channel component #125
Conversation
dispatcher.join_channel(channel_id); | ||
stop_cheat_caller_address(channel_contract_address); | ||
} | ||
|
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.
let's add an additional test to check that when a profile joins a channel, the channel NFT is minted to him
dispatcher.leave_channel(channel_id); | ||
stop_cheat_caller_address(channel_contract_address); | ||
} | ||
|
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.
add an extra test to check that the channel to be left has members in the first place else it panics
stop_cheat_caller_address(channel_contract_address); | ||
} | ||
|
||
|
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.
add an extra test to check that when the profile leaves the channel, his channel nft is burnt
tests/test_channel.cairo
Outdated
|
||
#[test] | ||
#[should_panic(expected: ('Karst: not channel moderator',))] | ||
fn test_should_panic_if_not_mod_is_removed() { |
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.
rename to test_should_panic_if_profile_to_be_removed_is_not_mod
tests/test_channel.cairo
Outdated
} | ||
|
||
#[test] | ||
#[should_panic(expected: ('Karst: Not a Community Member',))] |
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.
this was a mistake, please use channel related error for this instead
No description provided.