mirror of
https://github.com/zhigang1992/actions.git
synced 2026-01-12 22:45:39 +08:00
more descriptive tests
This commit is contained in:
@@ -6,20 +6,20 @@ PATH="$PATH:$BATS_TEST_DIRNAME/../bin"
|
||||
|
||||
export GITHUB_EVENT_PATH="$BATS_TEST_DIRNAME/fixtures/deployment.json"
|
||||
|
||||
@test "deployment event" {
|
||||
@test "returns deployment id and $? = 0 deployment event" {
|
||||
run deployment-get-id
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "87972451" ]
|
||||
}
|
||||
|
||||
@test "GITHUB_EVENT_PATH not set" {
|
||||
@test "returns error code when GITHUB_EVENT_PATH not set" {
|
||||
skip "this probably does not have the right behaviour?"
|
||||
unset GITHUB_EVENT_PATH
|
||||
run deployment-get-id
|
||||
[ "$status" -ne 0 ]
|
||||
}
|
||||
|
||||
@test "other event" {
|
||||
@test "returns error code on other event than deployment" {
|
||||
export GITHUB_EVENT_PATH="$BATS_TEST_DIRNAME/fixtures/pull_request_event.json"
|
||||
run deployment-get-id
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
Reference in New Issue
Block a user