Skip to content

Commit

Permalink
revision (fixes #2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Mar 22, 2021
1 parent 9ddbc3c commit 986cb6b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/message.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ load test-helper
assert_success
}

@test "$clinom message slack apitoken (TEST)" {
run "${clicmd}" message slack apitoken
assert_output --partial 'Your API access token is'
}

@test "$clinom message slack apitoken (create invalid token)" {
run "${clicmd}" config delete slack_apitoken
run "${clicmd}" message slack apitoken fake-token
Expand All @@ -22,17 +27,14 @@ load test-helper
assert_output --partial 'Your slack apitoken'
}

@test "$clinom message slack apitoken (TEST)" {
run "${clicmd}" message slack apitoken
assert_output --partial 'Your slack apitoken (xoxp-fake-token)'
}

@test "$clinom message slack apitoken (overrite token)" {
run "${clicmd}" message slack apitoken xoxp-fake-token
run "${clicmd}" message slack apitoken xoxp-another-fake-token
assert_output --partial 'Your slack apitoken (xoxp-another-fake-token)'
}

@test "$clinom message slack apitoken (with token)" {
run "${clicmd}" message slack apitoken xoxp-fake-token
run "${clicmd}" message slack apitoken
assert_output --partial 'Your API access token is'
}

0 comments on commit 986cb6b

Please sign in to comment.