From 5a21d2d987efbdfc68221f1605b71eced18fbad9 Mon Sep 17 00:00:00 2001 From: Andreas Heim Date: Fri, 14 Jun 2019 13:03:16 -0400 Subject: [PATCH] more descriptive tests --- github-deploy/test/deployment-get-id.bats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/github-deploy/test/deployment-get-id.bats b/github-deploy/test/deployment-get-id.bats index 6cef70b..54bde9f 100644 --- a/github-deploy/test/deployment-get-id.bats +++ b/github-deploy/test/deployment-get-id.bats @@ -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 ]