From 55b0c9cb05e891e9776437229efd66bd84e3cbdb Mon Sep 17 00:00:00 2001 From: Elden Young <59600396+ytqaljn@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:20:36 +0800 Subject: [PATCH] Fix merge unresovle (#232) * fix: unresolved conflict * fix: unresolved conflic --- c-pallets/cacher/src/tests.rs | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/c-pallets/cacher/src/tests.rs b/c-pallets/cacher/src/tests.rs index 3a034aad..08abf1e5 100644 --- a/c-pallets/cacher/src/tests.rs +++ b/c-pallets/cacher/src/tests.rs @@ -2,7 +2,7 @@ use super::*; use frame_support::{assert_noop, assert_ok}; -use mock::{new_test_ext, Cacher, Origin, Test}; +use mock::{new_test_ext, Cacher, RuntimeOrigin, Test}; use sp_runtime::traits::Hash; use pallet_balances::Error as BalancesError; @@ -41,15 +41,8 @@ fn update_works() { byte_price: 200u32.into(), }; // Wrong accout update fails. -<<<<<<< HEAD -<<<<<<< HEAD - assert_noop!(Cacher::update(RuntimeOrigin::signed(2), new_info.clone()), Error::::UnRegister); -======= - assert_noop!(Cacher::update(Origin::signed(2), new_info.clone()), Error::::UnRegistered); ->>>>>>> main -======= + assert_noop!(Cacher::update(RuntimeOrigin::signed(2), new_info.clone()), Error::::UnRegister); ->>>>>>> main // Update works. assert_ok!(Cacher::update(RuntimeOrigin::signed(1), new_info.clone())); @@ -69,15 +62,8 @@ fn logout_works() { assert_ok!(Cacher::register(RuntimeOrigin::signed(1), info.clone())); // Wrong accout logout fails. -<<<<<<< HEAD -<<<<<<< HEAD - assert_noop!(Cacher::logout(RuntimeOrigin::signed(2)), Error::::UnRegister); -======= - assert_noop!(Cacher::logout(Origin::signed(2)), Error::::UnRegistered); ->>>>>>> main -======= assert_noop!(Cacher::logout(RuntimeOrigin::signed(2)), Error::::UnRegister); ->>>>>>> main + // Logout works. assert_ok!(Cacher::logout(RuntimeOrigin::signed(1))); }); @@ -105,15 +91,7 @@ fn pay_works() { let bills: BoundedVec<_, ::BillsLimit> = bill_vec.try_into().unwrap(); // Pay fails. -<<<<<<< HEAD -<<<<<<< HEAD - assert_noop!(Cacher::pay(RuntimeOrigin::signed(1), bills.clone()), Error::::InsufficientBalance); -======= - assert_noop!(Cacher::pay(Origin::signed(1), bills.clone()), BalancesError::::InsufficientBalance); ->>>>>>> main -======= assert_noop!(Cacher::pay(RuntimeOrigin::signed(1), bills.clone()), Error::::InsufficientBalance); ->>>>>>> main ::Currency::make_free_balance_be(&1, BalanceOf::::max_value()); let balance_befor_1 = ::Currency::free_balance(&1);