Skip to content

Commit

Permalink
chore:refactor test cases for add and remove mod function
Browse files Browse the repository at this point in the history
  • Loading branch information
mubarak23 committed Oct 10, 2024
1 parent 4e1681a commit efce57e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/test_community.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn test_join_community() {
start_cheat_caller_address(community_contract_address, USER_ONE.try_into().unwrap());
//create the community
let community_id = communityDispatcher.create_comminuty(CommunityType::Free);

let is_member = communityDispatcher
.is_community_member(USER_ONE.try_into().unwrap(), community_id);

Expand Down Expand Up @@ -144,7 +144,6 @@ fn test_leave_community() {
start_cheat_caller_address(community_contract_address, USER_ONE.try_into().unwrap());
//create the community
let community_id = communityDispatcher.create_comminuty(CommunityType::Free);


stop_cheat_caller_address(community_contract_address);

Expand Down Expand Up @@ -175,12 +174,11 @@ fn test_should_panic_if_profile_leaving_is_not_a_member() {
let community_contract_address = __setup__();

let communityDispatcher = ICommunityDispatcher { contract_address: community_contract_address };

start_cheat_caller_address(community_contract_address, USER_ONE.try_into().unwrap());
//create the community
let community_id = communityDispatcher.create_comminuty(CommunityType::Free);


stop_cheat_caller_address(community_contract_address);

// leave community
Expand Down Expand Up @@ -490,7 +488,6 @@ fn should_panic_if_caller_removing_mod_is_not_owner() {
moderators.append(USER_FOUR.try_into().unwrap());
// REMOVE A MOD
communityDispatcher.remove_community_mods(community_id, moderators);

}

// #[test]
Expand Down

0 comments on commit efce57e

Please sign in to comment.