From f238e399d9cc59ab8fa23678351a0d1f55d9461c Mon Sep 17 00:00:00 2001 From: ytqaljn <2716693942@qq.com> Date: Tue, 19 Sep 2023 02:52:13 -0700 Subject: [PATCH 1/2] fix: unresolved conflict --- c-pallets/cacher/src/tests.rs | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/c-pallets/cacher/src/tests.rs b/c-pallets/cacher/src/tests.rs index 3a034aad..53d41232 100644 --- a/c-pallets/cacher/src/tests.rs +++ b/c-pallets/cacher/src/tests.rs @@ -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); From 9b9a9394627bd5930973abe7e8ac50bafa69933e Mon Sep 17 00:00:00 2001 From: ytqaljn <2716693942@qq.com> Date: Tue, 19 Sep 2023 02:52:39 -0700 Subject: [PATCH 2/2] fix: unresolved conflic --- c-pallets/cacher/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-pallets/cacher/src/tests.rs b/c-pallets/cacher/src/tests.rs index 53d41232..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;