diff --git a/package.json b/package.json index 21536182f..3fcd00b23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.25.47", + "version": "1.25.48", "remote": "4000", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh", diff --git a/tests/ntp.bats b/tests/ntp.bats index d726ad281..c44c6012a 100755 --- a/tests/ntp.bats +++ b/tests/ntp.bats @@ -1,12 +1,27 @@ #!/usr/bin/env bats load test-helper -@test "$clinom ntp internet" { - run "${clicmd}" ntp internet - assert_success && assert_output -p 'Success' +@test "$clinom ntp (no arguments)" { + run "${clicmd}" ntp + assert_failure && assert_output -p 'only local or internet' +} + +@test "$clinom ntp (invalid argument)" { + run "${clicmd}" ntp foobar + assert_failure && assert_output -p 'only local or internet' +} + +@test "$clinom ntp internet (too many arguments)" { + run "${clicmd}" ntp internet foobar + assert_failure && assert_output -p 'Too many arguments.' } @test "$clinom ntp local" { run "${clicmd}" ntp local assert_success && assert_output -p 'Success' } + +@test "$clinom ntp internet" { + run "${clicmd}" ntp internet + assert_success && assert_output -p 'Success' +}