-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
} |