summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-09-20 08:42:04 +0300
committerLars Wirzenius <liw@liw.fi>2019-09-20 08:42:04 +0300
commit873d1d111037f4f94a9db3991a2d9d2b9e88d262 (patch)
tree9b57119ddf944b34eedade0cb2a6b88e6faee51f /src
parentea7cf4abf89d283890c89799e69e7272fd4dcaae (diff)
downloadroadmap-873d1d111037f4f94a9db3991a2d9d2b9e88d262.tar.gz
Add: unit test for adding step to roadmap
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index aa1d1eb..5d050c8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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"]);
+ }
}