chronoscope/test/support/case.ex

27 lines
512 B
Elixir
Raw Normal View History

2024-04-01 10:40:35 -04:00
defmodule Chronoscope.Case do
use ExUnit.CaseTemplate
2024-04-14 17:23:13 -04:00
using do
quote do
import Chronoscope.Case
end
end
2024-04-01 10:40:35 -04:00
setup _tags do
2024-04-20 13:41:19 -04:00
Mox.stub_with(Chronoscope.DateTimeMock, Chronoscope.DateTimeStub)
2024-04-01 10:40:35 -04:00
:ok
end
2024-04-14 17:23:13 -04:00
def peercert() do
:secp256r1
|> X509.PrivateKey.new_ec()
|> X509.Certificate.self_signed("/C=US/ST=CA/L=San Francisco/O=Acme/CN=Test")
|> X509.Certificate.to_der()
end
def send_ssl_response(response) do
send(self(), {:ssl, nil, response})
:ok
end
2024-04-01 10:40:35 -04:00
end