summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBen Busby <noreply+git@benbusby.com>2021-10-26 00:23:31 -0600
committerBen Busby <noreply+git@benbusby.com>2021-10-26 00:23:31 -0600
commite87973c5e5c3c2091a1bf2b69f5adf40f48ffde7 (patch)
tree8df64e9a8f3beca98306012eef1a80a989ca1dee /test
parentd7a425509e0ac50884c3b053b74b0a5fd294b7fb (diff)
downloadfarside-e87973c5e5c3c2091a1bf2b69f5adf40f48ffde7.tar.gz
Add basic router test
Obviously going to be expanded upon by quite a bit, but just wanted to get started with basic testing sooner rather than later.
Diffstat (limited to 'test')
-rw-r--r--test/privacy_revolver_test.exs16
1 files changed, 13 insertions, 3 deletions
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