Skip to content

Commit

Permalink
update tests/rename.bats (fixes #2187) (#2191)
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 26, 2021
1 parent 9f0a7ba commit 2b63128
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 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.53",
"version": "1.25.54",
"remote": "4000",
"description": "Thin command-line interface for Raspberry Pi low level configuration.",
"main": "cli.sh",
Expand Down
19 changes: 17 additions & 2 deletions tests/rename.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#!/usr/bin/env bats
load test-helper

@test "$clinom rename treehouses" {
@test "$clinom rename (no arguments added)" {
run "${clicmd}" rename
assert_failure && assert_output -p 'Unsuccessful'
}

@test "$clinom rename (invalid characters)" {
run "${clicmd}" rename -treehouses
assert_failure && assert_output -p 'Unsuccessful'
}

@test "$clinom rename (too many characters)" {
run "${clicmd}" rename treehousestreehousestreehousestreehousestreehousestreehousestreehouses
assert_failure && assert_output -p 'Unsuccessful'
}

@test "$clinom rename (new name)" {
run "${clicmd}" rename treehouses
assert_success && assert_output -p 'Success'
}
}

0 comments on commit 2b63128

Please sign in to comment.