Skip to content

Commit

Permalink
test: is_github_actions()
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed May 9, 2024
1 parent fea9835 commit c8739cb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/is_github_actions.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: GPL-3.0-or-later

setup_file () {
load 'test_helper/common-setup'
_common_setup
}

setup () {
load 'test_helper/bats-assert/load'
load 'test_helper/bats-support/load'
}

@test "is_github_actions()" {
source "${PROJECT_ROOT}/src/functions.sh"

run is_github_actions
assert_failure 1

GITHUB_ACTIONS="1"
run is_github_actions
assert_success
}

teardown () {
export \
GITHUB_ACTIONS=""
}

0 comments on commit c8739cb

Please sign in to comment.