From d8ba03f6179fe63bdeab82438b8983802b19f02d Mon Sep 17 00:00:00 2001 From: RJ Padilla Date: Fri, 16 Apr 2021 21:36:08 -0400 Subject: [PATCH] update `tests/locale.bats` (fixes #2181) (#2182) Co-authored-by: dogi --- package.json | 2 +- tests/locale.bats | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c2fa884c5..21536182f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.25.46", + "version": "1.25.47", "remote": "4000", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh", diff --git a/tests/locale.bats b/tests/locale.bats index 0445fdd43..d8f3d6e43 100755 --- a/tests/locale.bats +++ b/tests/locale.bats @@ -1,17 +1,18 @@ #!/usr/bin/env bats load test-helper -@test "$clinom locale (no argument)" { +@test "$clinom locale (no arguments added)" { run "${clicmd}" locale - assert_output -p 'locale is missing' + assert_failure && assert_output -p 'the locale is missing' } -@test "$clinom locale en_US" { +@test "$clinom locale en_US (supported argument)" { run "${clicmd}" locale en_US assert_success && assert_output -p 'locale has been changed' } -@test "$clinom locale (non-supported locale)" { - run "${clicmd}" locale no_NO - assert_output -p 'is not supported' -} \ No newline at end of file + +@test "$clinom locale foo_BAR (non-supported argument added)" { + run "${clicmd}" locale foo_BAR + assert_failure && assert_output -p 'is not supported' +}