Skip to content

Commit

Permalink
Add formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thymusvulgaris committed Jun 25, 2024
1 parent 446ab8b commit 2ae682d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions test/plug/router_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -616,28 +616,28 @@ defmodule Plug.RouterTest do

test "ArgumentError is raised when match/3 is not given :to or :do option" do
assert %{message: "expected one of :to or :do to be given as option"} =
catch_error(
defmodule NoExpectedMatchOptions do
use Plug.Router
catch_error(
defmodule NoExpectedMatchOptions do
use Plug.Router

plug :match
plug :dispatch
plug :match
plug :dispatch

match "/", foo: :bar
end
)
match "/", foo: :bar
end
)
end

test "RuntimeError is raised when no routes are defined" do
assert %{message: "no routes defined in module Plug.RouterTest.NoRoutes using Plug.Router"} =
catch_error(
defmodule NoRoutes do
use Plug.Router

plug :match
plug :dispatch
end
)
catch_error(
defmodule NoRoutes do
use Plug.Router

plug :match
plug :dispatch
end
)
end

defp attach(handler_id, event) do
Expand Down

0 comments on commit 2ae682d

Please sign in to comment.