Skip to content

Commit d6d5917

Browse files
beatrizChagaswevtimoteogaraujodev
committed
Introduce AutoFormatter.ActionTest
Co-authored-by: wevtimoteo <[email protected]> Co-authored-by: garaujodev <[email protected]>
1 parent 9c9283c commit d6d5917

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/action_test.exs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
defmodule AutoFormatter.ActionTest do
2+
use ExUnit.Case, async: true
3+
4+
import Mox
5+
6+
alias AutoFormatter.{Action, HookManagerBehaviourMock}
7+
8+
setup :verify_on_exit!
9+
10+
describe ".perform/1" do
11+
test "when receives init create git hook" do
12+
expect(HookManagerBehaviourMock, :create, fn _hook_filename, _hook_content ->
13+
:ok
14+
end)
15+
16+
assert Action.perform(:init) == :ok
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)