Skip to content

Commit

Permalink
Update tests.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
dudo50 committed Nov 4, 2024
1 parent 50c1000 commit 286eb41
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions templates/parachain_two/pallets/xcnft/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ pub mod testpara;
pub mod testrelay;

use frame_support::assert_noop;
use sp_runtime::{traits::Bounded, AccountId32, BoundedVec, BuildStorage};
use sp_runtime::{AccountId32, BoundedVec, BuildStorage};
use cumulus_primitives_core::Parachain;
use xcm_executor::traits::ConvertLocation;
use xcm::prelude::*;
use crate::tests::testpara::XcNFT;
use pallet_uniques;

pub const ALICE: AccountId32 = AccountId32::new([0u8; 32]);
pub const BOB: AccountId32 = AccountId32::new([1u8; 32]);
Expand Down Expand Up @@ -788,24 +788,6 @@ fn try_parse_collection_metadata_successful() {
});
}

#[test]
fn try_parse_collection_owner_successful() {
ParaA::execute_with(|| {
testpara::System::set_block_number(2);

let _ = testpara::NFTs::create(testpara::RuntimeOrigin::signed(ALICE), 0, ALICE);

pallet_uniques::OwnershipAcceptance::<Test>::insert(BOB, 0);

let _ = testpara::XcNFT::parse_collection_owner(testpara::RuntimeOrigin::signed(ALICE), BOB, 0);

testpara::System::assert_has_event(testpara::RuntimeEvent::NFTs(pallet_uniques::Event::OwnerChanged {
collection: 0,
new_owner: BOB,
}));
});
}

#[test]
fn try_parse_nft_burn_successful() {
ParaA::execute_with(|| {
Expand Down

0 comments on commit 286eb41

Please sign in to comment.