diff --git a/package.json b/package.json index 0ad1056cf..51e38b561 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/rename.bats b/tests/rename.bats index 9859167e2..07213c078 100755 --- a/tests/rename.bats +++ b/tests/rename.bats @@ -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' -} \ No newline at end of file +}