|
@@ -467,121 +467,3 @@ pub fn run_to_block(n: u64) {
|
|
|
pub type CollectiveFlip = randomness_collective_flip::Module<Test>;
|
|
|
|
|
|
pub type Balances = balances::Module<Test>;
|
|
|
-
|
|
|
-// pub fn delete_channel_mock(
|
|
|
-// sender: u64,
|
|
|
-// actor: ContentActor<CuratorGroupId, CuratorId, MemberId>,
|
|
|
-// channel_id: ChannelId,
|
|
|
-// objects_num: u64,
|
|
|
-// result: DispatchResult,
|
|
|
-// ) {
|
|
|
-// assert_eq!(
|
|
|
-// Content::delete_channel(
|
|
|
-// Origin::signed(sender),
|
|
|
-// actor.clone(),
|
|
|
-// channel_id.clone(),
|
|
|
-// objects_num,
|
|
|
-// ),
|
|
|
-// result.clone(),
|
|
|
-// );
|
|
|
-
|
|
|
-// if result.is_ok() {
|
|
|
-// assert_eq!(
|
|
|
-// System::events().last().unwrap().event,
|
|
|
-// MetaEvent::content(RawEvent::ChannelDeleted(actor.clone(), channel_id))
|
|
|
-// )
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
-// pub fn create_video_mock(
|
|
|
-// sender: u64,
|
|
|
-// actor: ContentActor<CuratorGroupId, CuratorId, MemberId>,
|
|
|
-// channel_id: ChannelId,
|
|
|
-// params: VideoCreationParameters<Test>,
|
|
|
-// result: DispatchResult,
|
|
|
-// ) {
|
|
|
-// let video_id = Content::next_video_id();
|
|
|
-// let num_videos_pre = Content::channel_by_id(channel_id).num_videos;
|
|
|
-
|
|
|
-// assert_eq!(
|
|
|
-// Content::create_video(
|
|
|
-// Origin::signed(sender),
|
|
|
-// actor.clone(),
|
|
|
-// channel_id.clone(),
|
|
|
-// params.clone()
|
|
|
-// ),
|
|
|
-// result.clone(),
|
|
|
-// );
|
|
|
-
|
|
|
-// if result.is_ok() {
|
|
|
-// assert_eq!(
|
|
|
-// System::events().last().unwrap().event,
|
|
|
-// MetaEvent::content(RawEvent::VideoCreated(
|
|
|
-// actor.clone(),
|
|
|
-// channel_id,
|
|
|
-// video_id,
|
|
|
-// params.clone(),
|
|
|
-// ))
|
|
|
-// );
|
|
|
-// assert_eq!(
|
|
|
-// num_videos_pre + 1,
|
|
|
-// Content::channel_by_id(channel_id).num_videos,
|
|
|
-// );
|
|
|
-// }
|
|
|
-// }
|
|
|
-// pub fn update_video_mock(
|
|
|
-// sender: u64,
|
|
|
-// actor: ContentActor<CuratorGroupId, CuratorId, MemberId>,
|
|
|
-// video_id: <Test as Trait>::VideoId,
|
|
|
-// params: VideoUpdateParameters<Test>,
|
|
|
-// result: DispatchResult,
|
|
|
-// ) {
|
|
|
-// // let channel_id = Content::video_by_id(video_id.clone()).in_channel;
|
|
|
-// // let num_videos_pre = Content::channel_by_id(channel_id).num_videos;
|
|
|
-
|
|
|
-// assert_eq!(
|
|
|
-// Content::update_video(
|
|
|
-// Origin::signed(sender),
|
|
|
-// actor.clone(),
|
|
|
-// video_id.clone(),
|
|
|
-// params.clone(),
|
|
|
-// ),
|
|
|
-// result.clone(),
|
|
|
-// );
|
|
|
-
|
|
|
-// if result.is_ok() {
|
|
|
-// assert_eq!(
|
|
|
-// System::events().last().unwrap().event,
|
|
|
-// MetaEvent::content(RawEvent::VideoUpdated(
|
|
|
-// actor.clone(),
|
|
|
-// video_id,
|
|
|
-// params.clone(),
|
|
|
-// ))
|
|
|
-// );
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
-// pub fn delete_video_mock(
|
|
|
-// sender: u64,
|
|
|
-// actor: ContentActor<CuratorGroupId, CuratorId, MemberId>,
|
|
|
-// video_id: <Test as Trait>::VideoId,
|
|
|
-// assets_to_remove: BTreeSet<DataObjectId<Test>>,
|
|
|
-// result: DispatchResult,
|
|
|
-// ) {
|
|
|
-// assert_eq!(
|
|
|
-// Content::delete_video(
|
|
|
-// Origin::signed(sender),
|
|
|
-// actor.clone(),
|
|
|
-// video_id.clone(),
|
|
|
-// assets_to_remove.clone(),
|
|
|
-// ),
|
|
|
-// result.clone(),
|
|
|
-// );
|
|
|
-
|
|
|
-// if result.is_ok() {
|
|
|
-// assert_eq!(
|
|
|
-// System::events().last().unwrap().event,
|
|
|
-// MetaEvent::content(RawEvent::VideoDeleted(actor.clone(), video_id))
|
|
|
-// );
|
|
|
-// }
|
|
|
-// }
|