Skip to content

Commit 081cb03

Browse files
committed
Register TentacatMock.ClientMock
1 parent f065fa1 commit 081cb03

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/behaviours/tentacat_behaviour.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
defmodule ElixirScript.Behaviours.TentacatBehaviour.ClientBehaviour do
2+
@callback new() :: Tentacat.Client.t()
3+
@callback new(%{access_token: binary()}) :: Tentacat.Client.t()
4+
end

test/test_helper.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
Mox.defmock(SystemEnvMock, for: ElixirScript.Behaviours.SystemEnvBehaviour)
22
Application.put_env(:context, :system_env, SystemEnvMock)
33

4+
Mox.defmock(TentacatMock.ClientMock,
5+
for: ElixirScript.Behaviours.TentacatBehaviour.ClientBehaviour
6+
)
7+
8+
Application.put_env(:script_runner, :tentacat_client, TentacatMock.ClientMock)
9+
410
ExUnit.start()

0 commit comments

Comments
 (0)