From db7c5deb0f58d6cc706c60668e4beb75e2774d8b Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Tue, 10 Oct 2023 12:05:03 +0200 Subject: [PATCH] Fix `should_return_allowance()` test --- pallets/orml-currencies-allowance-extension/src/tests.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pallets/orml-currencies-allowance-extension/src/tests.rs b/pallets/orml-currencies-allowance-extension/src/tests.rs index fcf59ea79..cb97aaacb 100644 --- a/pallets/orml-currencies-allowance-extension/src/tests.rs +++ b/pallets/orml-currencies-allowance-extension/src/tests.rs @@ -141,6 +141,12 @@ fn should_return_allowance() { let delegate: ::AccountId = 1; let amount: ::Balance = 1_000_000_000u32 as Balance; + // We need to add the currency first + assert_ok!(TokenAllowance::add_allowed_currencies( + RuntimeOrigin::root(), + vec![currency_id] + )); + // Check allowance assert_eq!(TokenAllowance::allowance(currency_id, &owner, &delegate), 0);