Goal: have a personal blog, and try out another point in the 'modular app design with elixir' space. Designing OTP systems with elixir had some interesting ideas.
16 lines
355 B
Elixir
16 lines
355 B
Elixir
defmodule Blogex.NotFoundErrorTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
test "has a 404 plug status" do
|
|
error = %Blogex.NotFoundError{message: "not found"}
|
|
|
|
assert error.plug_status == 404
|
|
end
|
|
|
|
test "is raisable with a message" do
|
|
assert_raise Blogex.NotFoundError, "gone", fn ->
|
|
raise Blogex.NotFoundError, "gone"
|
|
end
|
|
end
|
|
end
|