Skip to content

Commit

Permalink
update tests/locale.bats (fixes #2181) (#2182)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
rjpadilla and dogi authored Apr 17, 2021
1 parent 19a13d4 commit d8ba03f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
15 changes: 8 additions & 7 deletions tests/locale.bats
Original file line number Diff line number Diff line change
@@ -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'
}

@test "$clinom locale foo_BAR (non-supported argument added)" {
run "${clicmd}" locale foo_BAR
assert_failure && assert_output -p 'is not supported'
}

0 comments on commit d8ba03f

Please sign in to comment.