summaryrefslogtreecommitdiff
path: root/src/test/fixtures/channel.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/fixtures/channel.rs')
-rw-r--r--src/test/fixtures/channel.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/fixtures/channel.rs b/src/test/fixtures/channel.rs
index a1dda61..3831c82 100644
--- a/src/test/fixtures/channel.rs
+++ b/src/test/fixtures/channel.rs
@@ -11,6 +11,7 @@ use crate::{
channel::{self, Channel},
clock::RequestedAt,
event::Event,
+ name::Name,
};
pub async fn create(app: &App, created_at: &RequestedAt) -> Channel {
@@ -21,13 +22,13 @@ pub async fn create(app: &App, created_at: &RequestedAt) -> Channel {
.expect("should always succeed if the channel is actually new")
}
-pub fn propose() -> String {
- rand::random::<Name>().to_string()
+pub fn propose() -> Name {
+ rand::random::<NameTemplate>().to_string().into()
}
-struct Name(String);
+struct NameTemplate(String);
faker_impl_from_templates! {
- Name; "{} {}", CityName, FullName;
+ NameTemplate; "{} {}", CityName, FullName;
}
pub fn events(event: Event) -> future::Ready<Option<channel::Event>> {