Skip to content

Commit

Permalink
first usable test (fixes #2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Mar 20, 2021
1 parent da02bfe commit 99b6ca2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/message.bats
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ load test-helper
run "${clicmd}" config delete xoxp-fake-token
}

# Needs to 'store' previous tokens and re-add them
@test "$clinom message slack apitoken (after invalid token)" {
run tokens=$(treehouses config)
if [ -n "$tokens" ];
run slack=${"$tokens#"#slack_apitoken="}
fi
# run tokens=$(treehouses config)
# if [ -n "$tokens" ];
# run slack=${"$tokens#"#slack_apitoken="}
# fi
run "${clicmd}" config clear
run "${clicmd}" message slack apitoken fake-token
run "${clicmd}" message slack apitoken
assert_output --partial 'api.slack.com/apps'
run "${clicmd}" config delete fake-token
if [ -n "$tokens" ];
run "${clicmd}" message slack apitoken "$(slack)"
fi
# if [ -n "$tokens" ];
# run "${clicmd}" message slack apitoken "$(slack)"
# fi
}

0 comments on commit 99b6ca2

Please sign in to comment.