summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-29 20:44:03 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-29 20:44:03 -0400
commit9010c7feeca8f4e7e501ad474911deaaf7a1a367 (patch)
treee2fb736e7923c0d084ee3ebffe03752dc237edfb /src/test
parent15311c7bd816a83d0641de6b6bb3c41bb67079db (diff)
Restrict channel names, too.
Thankfully, channel creation only happens in one place, so we don't need a state machine for this.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fixtures/channel.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/fixtures/channel.rs b/src/test/fixtures/channel.rs
index 0c6480b..98048f2 100644
--- a/src/test/fixtures/channel.rs
+++ b/src/test/fixtures/channel.rs
@@ -1,6 +1,7 @@
use faker_rand::{
en_us::{addresses::CityName, names::FullName},
faker_impl_from_templates,
+ lorem::Paragraphs,
};
use rand;
@@ -23,6 +24,10 @@ pub fn propose() -> Name {
rand::random::<NameTemplate>().to_string().into()
}
+pub fn propose_invalid_name() -> Name {
+ rand::random::<Paragraphs>().to_string().into()
+}
+
struct NameTemplate(String);
faker_impl_from_templates! {
NameTemplate; "{} {}", CityName, FullName;