diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-09-20 08:42:04 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-09-20 08:42:04 +0300 |
commit | 873d1d111037f4f94a9db3991a2d9d2b9e88d262 (patch) | |
tree | 9b57119ddf944b34eedade0cb2a6b88e6faee51f /src | |
parent | ea7cf4abf89d283890c89799e69e7272fd4dcaae (diff) | |
download | roadmap-873d1d111037f4f94a9db3991a2d9d2b9e88d262.tar.gz |
Add: unit test for adding step to roadmap
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -165,4 +165,13 @@ mod tests { let roadmap = Roadmap::new(); assert_eq!(roadmap.step_names().len(), 0); } + + #[test] + fn add_step_to_roadmap() { + let mut roadmap = Roadmap::new(); + let first = Step::new("first", "the first step"); + roadmap.add_step(&first).unwrap(); + assert_eq!(roadmap.step_names().len(), 1); + assert_eq!(roadmap.step_names(), vec!["first"]); + } } |