Mokhtar Naamani 5 years ago
parent
commit
0e0a3a5ec0
2 changed files with 16 additions and 10 deletions
  1. 0 1
      src/content_working_group/lib.rs
  2. 16 9
      src/content_working_group/tests.rs

+ 0 - 1
src/content_working_group/lib.rs

@@ -2106,7 +2106,6 @@ impl<T: Trait> Module<T> {
         Ok(())
     }
 
-
     fn ensure_channel_title_is_valid(text_opt: &OptionalText) -> dispatch::Result {
         if let Some(text) = text_opt {
             ChannelTitleConstraint::get().ensure_valid(

+ 16 - 9
src/content_working_group/tests.rs

@@ -142,9 +142,9 @@ fn create_channel_description_too_long() {
                 None,
             );
 
-            fixture.description = Some(
-                generate_too_long_length_buffer(&ChannelDescriptionConstraint::get())
-            );
+            fixture.description = Some(generate_too_long_length_buffer(
+                &ChannelDescriptionConstraint::get(),
+            ));
 
             fixture.call_and_assert_error(MSG_CHANNEL_DESCRIPTION_TOO_LONG);
         });
@@ -162,9 +162,9 @@ fn create_channel_description_too_short() {
                 None,
             );
 
-            fixture.description = Some(
-                generate_too_short_length_buffer(&ChannelDescriptionConstraint::get())
-            );
+            fixture.description = Some(generate_too_short_length_buffer(
+                &ChannelDescriptionConstraint::get(),
+            ));
 
             fixture.call_and_assert_error(MSG_CHANNEL_DESCRIPTION_TOO_SHORT);
         });
@@ -202,8 +202,13 @@ impl UpdateChannelAsCurationActorFixture {
         let old_channel = ChannelById::<Test>::get(channel_id);
 
         let upd_verified = self.new_verified.unwrap_or(old_channel.verified);
-        let upd_description = self.new_description.clone().unwrap_or(old_channel.description);
-        let upd_curation_status = self.new_curation_status.unwrap_or(old_channel.curation_status);
+        let upd_description = self
+            .new_description
+            .clone()
+            .unwrap_or(old_channel.description);
+        let upd_curation_status = self
+            .new_curation_status
+            .unwrap_or(old_channel.curation_status);
 
         let expected_updated_channel = Channel {
             verified: upd_verified,
@@ -1875,7 +1880,9 @@ impl CreateChannelFixture {
             channel_title: Some(generate_valid_length_buffer(&ChannelTitleConstraint::get())),
             avatar: Some(generate_valid_length_buffer(&ChannelAvatarConstraint::get())),
             banner: Some(generate_valid_length_buffer(&ChannelBannerConstraint::get())),
-            description: Some(generate_valid_length_buffer(&ChannelDescriptionConstraint::get())),
+            description: Some(generate_valid_length_buffer(
+                &ChannelDescriptionConstraint::get(),
+            )),
             content: ChannelContentType::Video,
             publishing_status: ChannelPublishingStatus::NotPublished,
         }