Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
f-gate committed Dec 8, 2023
1 parent 08c4c2f commit 62b9929
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pallets/briefs/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mod benchmarks {
brief_id,
currency_id,
milestones,
Some(eoa)
Some(eoa),
false,
);
assert_last_event::<T>(Event::<T>::BriefSubmitted(caller, brief_id).into());
Expand Down
6 changes: 3 additions & 3 deletions pallets/proposals/src/tests/foreign_asset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{mock::*, *};
use frame_support::{assert_noop, assert_ok, error::BadOrigin};
use common_types::ForeignAssetId;
use test_utils::*;

#[test]
Expand All @@ -16,7 +17,7 @@ fn set_foreign_asset_signer_check_permission_for_edit() {
#[test]
fn foreign_asset_signer_can_mint() {
build_test_externality().execute_with(|| {
let currency_id = CurrencyId::ForeignAsset(10);
let currency_id = CurrencyId::ForeignAsset(ForeignAssetId::ETH);
let beneficiary = BOB;
let amount = 92839572;
let _ = Proposals::set_foreign_asset_signer(RuntimeOrigin::root(), ALICE);
Expand All @@ -36,11 +37,10 @@ fn foreign_asset_signer_can_mint() {
#[test]
fn non_foreign_asset_signer_cannot_mint() {
build_test_externality().execute_with(|| {
let currency_id = CurrencyId::ForeignAsset(10);
let currency_id = CurrencyId::ForeignAsset(ForeignAssetId::ETH);
let beneficiary = BOB;
let amount = 92839572;
let _ = Proposals::set_foreign_asset_signer(RuntimeOrigin::root(), ALICE);
let asset_signer = ForeignCurrencySigner::<Test>::get().unwrap();

assert_noop!(Proposals::mint_offchain_assets(RuntimeOrigin::signed(BOB), beneficiary, currency_id, amount), Error::<Test>::RequireForeignAssetSigner);
assert_noop!(Proposals::mint_offchain_assets(RuntimeOrigin::signed(CHARLIE), beneficiary, currency_id, amount), Error::<Test>::RequireForeignAssetSigner);
Expand Down
2 changes: 2 additions & 0 deletions pallets/proposals/src/tests/pallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ fn vote_on_milestone_autofinalises_on_all_voted_and_fail() {
});
}

#[test]
fn vote_struct_removed_on_autofinalisation_success() {
build_test_externality().execute_with(|| {
let cont = get_contributions::<Test>(vec![BOB, CHARLIE], 100_000);
Expand Down Expand Up @@ -646,6 +647,7 @@ fn vote_struct_removed_on_autofinalisation_success() {
});
}

#[test]
fn vote_struct_removed_on_autofinalisation_failure() {
build_test_externality().execute_with(|| {
let cont = get_contributions::<Test>(vec![BOB, CHARLIE], 100_000);
Expand Down

0 comments on commit 62b9929

Please sign in to comment.