Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions e2e/tools.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bats
# tools.bats - Test tools command help output

load test_helper

# Help

@test "tools without subcommand shows help" {
run basecamp tools
assert_success
assert_output_contains "COMMANDS"
}

# Help flag

@test "tools --help shows subcommand hint in usage" {
create_credentials
create_global_config '{"account_id": 99999}'

run basecamp tools --help
assert_success
assert_output_contains "basecamp tools <command>"
assert_output_contains "dock tools"
}

@test "tools -h shows subcommand hint in usage" {
create_credentials
create_global_config '{"account_id": 99999}'

run basecamp tools -h
assert_success
assert_output_contains "basecamp tools <command>"
}
2 changes: 1 addition & 1 deletion internal/commands/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewToolsCmd() *cobra.Command {
var project string

cmd := &cobra.Command{
Use: "tools",
Use: "tools [action]",
Short: "Manage project dock tools",
Long: `Manage project dock tools (Chat, Schedule, Docs & Files, etc.).

Expand Down
Loading