Skip to content

Commit ae998f3

Browse files
committed
Use backward compatible command for current branch
1 parent 9df1ae5 commit ae998f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/config/branch_test.exs renamed to test/config/branch_config_test.exs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
defmodule GitHooks.Config.BranchTest do
1+
defmodule GitHooks.Config.BranchConfigTest do
22
@moduledoc false
33

44
use ExUnit.Case, async: false
55
use GitHooks.TestSupport.ConfigCase
66

77
alias GitHooks.Config.BranchConfig
88

9+
setup do
10+
on_exit(fn ->
11+
Application.delete_env(:git_hooks, :current_branch_fn)
12+
end)
13+
end
14+
915
describe "current_branch_allowed?/0" do
1016
test "when current branch is allowed to run for the git hook then current_branch_allowed? function returns true" do
1117
Application.put_env(:git_hooks, :current_branch_fn, fn -> {"master\n", 0} end)

0 commit comments

Comments
 (0)