File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @treehouses/cli" ,
3- "version" : " 1.25.35 " ,
3+ "version" : " 1.25.36 " ,
44 "remote" : " 4000" ,
55 "description" : " Thin command-line interface for Raspberry Pi low level configuration." ,
66 "main" : " cli.sh" ,
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bats
2+ load ../test-helper
3+
4+ @test " $clinom message slack apitoken" {
5+ run " ${clicmd} " message slack apitoken
6+ assert_success
7+ }
8+
9+ @test " $clinom message slack apitoken (create invalid token)" {
10+ run " ${clicmd} " message slack apitoken fake-token
11+ assert_output --partial ' invalid token'
12+ }
13+
14+ @test " $clinom message slack apitoken (no token)" {
15+ run " ${clicmd} " message slack apitoken
16+ assert_output --partial ' api.slack.com/apps'
17+ }
18+
19+ @test " $clinom message slack apitoken (create token)" {
20+ run " ${clicmd} " message slack apitoken xoxp-fake-token
21+ assert_output --partial ' Your slack apitoken'
22+ }
23+
24+ @test " $clinom message slack apitoken (overrite token)" {
25+ run " ${clicmd} " message slack apitoken xoxp-fake-token
26+ run " ${clicmd} " message slack apitoken xoxp-another-fake-token
27+ assert_output --partial ' Your slack apitoken (xoxp-another-fake-token)'
28+ }
29+
30+ @test " $clinom message slack apitoken (with token)" {
31+ run " ${clicmd} " message slack apitoken xoxp-fake-token
32+ run " ${clicmd} " message slack apitoken
33+ assert_output --partial ' Your API access token is'
34+ }
You can’t perform that action at this time.
0 commit comments