From a42651babf3356ca40da9753bd1809c83f282879 Mon Sep 17 00:00:00 2001 From: RJ Padilla Date: Mon, 26 Apr 2021 14:24:54 -0400 Subject: [PATCH] update `tests/detect.bats` (fixes #2171) (#2172) Co-authored-by: dogi --- package.json | 2 +- tests/detect.bats | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 35dfde00c6..3876ee8484 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.25.49", + "version": "1.25.50", "remote": "4000", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh", diff --git a/tests/detect.bats b/tests/detect.bats index a3e969a974..bfe90937ca 100755 --- a/tests/detect.bats +++ b/tests/detect.bats @@ -6,6 +6,11 @@ load test-helper assert_success } +@test "$clinom detect (invalid argument)" { + run "${clicmd}" detect asdf + assert_output --partial "options supported." +} + @test "$clinom detect bluetooth" { run "${clicmd}" detect bluetooth assert_success @@ -21,6 +26,21 @@ load test-helper assert_success } +@test "$clinom detect rpi full" { + run "${clicmd}" detect rpi model + assert_success +} + +@test "$clinom detect rpi (invalid second argument)" { + run "${clicmd}" detect rpi foobar + assert_failure && assert_output --partial "commands supported" +} + +@test "$clinom detect