summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-10-13 10:11:59 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-11-02 18:19:30 +0100
commit61a1a241c82c79baa8b2a6dbb03fb70b49cca5ea (patch)
treece763be3a10c0d19739261bf17493ae92c22ecaf /tests
parentceabde799b07cb2bd375519e91819b3d762f88eb (diff)
Add test: imag-ids reports id after it was created
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/src/imag_ids.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/src/imag_ids.rs b/tests/ui/src/imag_ids.rs
index cc6ead25..2c38906e 100644
--- a/tests/ui/src/imag_ids.rs
+++ b/tests/ui/src/imag_ids.rs
@@ -57,3 +57,14 @@ fn test_no_ids_after_init() {
.stdout(predicate::eq(b"" as &[u8]));
}
+#[test]
+fn test_one_id_after_creating_one_entry() {
+ crate::setup_logging();
+ let imag_home = crate::imag::make_temphome();
+ crate::imag_init::call(&imag_home);
+ crate::imag_create::call(&imag_home, &["test"]);
+ let ids = call(&imag_home);
+
+ assert_eq!(ids.len(), 1);
+ assert_eq!(ids[0], "test");
+}