summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Every <devstopfix@gmail.com>2019-07-03 21:43:01 +0100
committerJames Every <devstopfix@gmail.com>2019-07-03 22:06:06 +0100
commitf5a9396e83fad4d8fff59977445eae38e5139601 (patch)
tree63c233b919c8f0d93172b5ac13b504fc1279207c
parentchore: format (diff)
test: makefile
-rw-r--r--test/gen_magic_test.exs14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/gen_magic_test.exs b/test/gen_magic_test.exs
index 675dd81..d3dd9a1 100644
--- a/test/gen_magic_test.exs
+++ b/test/gen_magic_test.exs
@@ -2,7 +2,17 @@ defmodule GenMagicTest do
use ExUnit.Case
doctest GenMagic
- test "greets the world" do
- assert GenMagic.hello() == :world
+ alias GenMagic.ApprenticeServer, as: Magic
+
+ setup_all do
+ {:ok, pid} = Magic.start_link()
+ {:ok, %{pid: pid}}
+ end
+
+ test "Makefile is text file", %{pid: pid} do
+ path = File.cwd!() |> Path.join("Makefile")
+
+ assert {:ok, [mime_type: "text/x-makefile", encoding: _, content: _]} =
+ GenServer.call(pid, {:perform, path})
end
end