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.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/fixtures/channel.rs b/src/test/fixtures/channel.rs
index a1dda61..024ac1b 100644
--- a/src/test/fixtures/channel.rs
+++ b/src/test/fixtures/channel.rs
@@ -8,7 +8,7 @@ use rand;
use crate::{
app::App,
- channel::{self, Channel},
+ channel::{self, Channel, Name},
clock::RequestedAt,
event::Event,
};
@@ -21,13 +21,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>> {