diff options
| -rw-r--r-- | mix.exs | 2 | ||||
| -rw-r--r-- | test/privacy_revolver_test.exs | 16 |
2 files changed, 14 insertions, 4 deletions
@@ -1,4 +1,4 @@ -defmodule RouterExample.MixProject do +defmodule PrivacyRevolver.MixProject do use Mix.Project def project do diff --git a/test/privacy_revolver_test.exs b/test/privacy_revolver_test.exs index aa8fa79..8c85530 100644 --- a/test/privacy_revolver_test.exs +++ b/test/privacy_revolver_test.exs @@ -1,8 +1,18 @@ defmodule PrivacyRevolverTest do use ExUnit.Case - doctest PrivacyRevolver + use Plug.Test - test "greets the world" do - assert PrivacyRevolver.hello() == :world + alias PrivacyRevolver.Router + + @opts Router.init([]) + + test "/" do + conn = + :get + |> conn("/", "") + |> Router.call(@opts) + + assert conn.state == :sent + assert conn.status == 200 end end |
