Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
credence0x committed Sep 15, 2024
1 parent 4f02106 commit 720afd8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions contracts/src/systems/combat/contracts.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,6 @@ mod combat_systems {

// leave battle
let mut battle: Battle = get!(world, battle_id, Battle);

InternalCombatImpl::leave_battle(world, ref battle, ref caller_army);

battle.update_state();
let battle_was_active = (battle.has_started() && !battle.has_ended());
InternalCombatImpl::leave_battle(world, ref battle, ref caller_army);
Expand Down
6 changes: 3 additions & 3 deletions contracts/src/systems/map/tests.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ use eternum::utils::testing::{

use starknet::contract_address_const;

const INITIAL_WHEAT_BALANCE: u128 = 1_000_000;
const INITIAL_FISH_BALANCE: u128 = 1_000_000;
const INITIAL_KNIGHT_BALANCE: u128 = 10_000;
const INITIAL_WHEAT_BALANCE: u128 = 10_000_000;
const INITIAL_FISH_BALANCE: u128 = 10_000_000;
const INITIAL_KNIGHT_BALANCE: u128 = 10_000_000;

const TIMESTAMP: u64 = 10_000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn test_caller_not_taker() {
#[available_gas(3000000000000)]
#[should_panic(
expected: (
"not enough resources, Resource (entity id: 3, resource type: DONKEY, balance: 0). deduction: 1000",
"not enough resources, Resource (entity id: 4, resource type: DONKEY, balance: 0). deduction: 1000",
'ENTRYPOINT_FAILED'
)
)]
Expand Down

0 comments on commit 720afd8

Please sign in to comment.