100 exercises to learn Rust
This commit is contained in:
14
helpers/ticket_fields/src/test_helpers.rs
Normal file
14
helpers/ticket_fields/src/test_helpers.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use crate::{TicketDescription, TicketTitle};
|
||||
use common::{valid_description, valid_title};
|
||||
|
||||
/// A function to generate a valid ticket title,
|
||||
/// for test purposes.
|
||||
pub fn ticket_title() -> TicketTitle {
|
||||
valid_title().try_into().unwrap()
|
||||
}
|
||||
|
||||
/// A function to generate a valid ticket description,
|
||||
/// for test purposes.
|
||||
pub fn ticket_description() -> TicketDescription {
|
||||
valid_description().try_into().unwrap()
|
||||
}
|
||||
Reference in New Issue
Block a user