Skip to content
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

Merged
merged 6 commits into from
Oct 20, 2024

Conversation

PavitraAgarwal21
Copy link
Contributor

No description provided.

dispatcher.join_channel(channel_id);
stop_cheat_caller_address(channel_contract_address);
}

Copy link
Member

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);
}

Copy link
Member

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);
}


Copy link
Member

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


#[test]
#[should_panic(expected: ('Karst: not channel moderator',))]
fn test_should_panic_if_not_mod_is_removed() {
Copy link
Member

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

}

#[test]
#[should_panic(expected: ('Karst: Not a Community Member',))]
Copy link
Member

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

@PavitraAgarwal21 PavitraAgarwal21 marked this pull request as ready for review October 18, 2024 10:11
@Darlington02 Darlington02 merged commit 59c7891 into horuslabsio:main Oct 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants