Skip to content

Commit

Permalink
Use backward compatible command for current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
qgadrian committed Jan 12, 2022
1 parent 9df1ae5 commit ae998f3
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1,11 +1,17 @@
defmodule GitHooks.Config.BranchTest do
defmodule GitHooks.Config.BranchConfigTest do
@moduledoc false

use ExUnit.Case, async: false
use GitHooks.TestSupport.ConfigCase

alias GitHooks.Config.BranchConfig

setup do
on_exit(fn ->
Application.delete_env(:git_hooks, :current_branch_fn)
end)
end

describe "current_branch_allowed?/0" do
test "when current branch is allowed to run for the git hook then current_branch_allowed? function returns true" do
Application.put_env(:git_hooks, :current_branch_fn, fn -> {"master\n", 0} end)
Expand Down

0 comments on commit ae998f3

Please sign in to comment.