Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles committed Dec 12, 2024
1 parent fc4be96 commit d07df70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/integration_tests/src/platform_moderator_tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::env::ENV;
use crate::utils::tick_many;
use crate::{client, CanisterIds, TestEnv, User};
use candid::Principal;
use pocket_ic::PocketIc;
Expand Down Expand Up @@ -66,17 +65,18 @@ fn report_message_succeeds() {
}

fn init_test_data(env: &mut PocketIc, canister_ids: &CanisterIds, controller: Principal) -> TestData {
let user = client::register_diamond_user(env, canister_ids, controller);
let user1 = client::register_diamond_user(env, canister_ids, controller);
let user2 = client::register_diamond_user(env, canister_ids, controller);

client::user_index::add_platform_moderator(
env,
controller,
canister_ids.user_index,
&user_index_canister::add_platform_moderator::Args { user_id: user.user_id },
&user_index_canister::add_platform_moderator::Args { user_id: user1.user_id },
);

let group_name = random_string();
let group_id = client::user::happy_path::create_group(env, &user, &group_name, false, true);
let group_id = client::user::happy_path::create_group(env, &user1, &group_name, false, true);

let moderators_group = match client::user_index::assign_platform_moderators_group(
env,
Expand Down

0 comments on commit d07df70

Please sign in to comment.