Skip to content

add plug tests#35

Merged
mitchellhenke merged 3 commits into
masterfrom
plug-tests
Aug 24, 2016
Merged

add plug tests#35
mitchellhenke merged 3 commits into
masterfrom
plug-tests

Conversation

@mitchellhenke

@mitchellhenke mitchellhenke commented Aug 24, 2016

Copy link
Copy Markdown
Contributor

@jeregrine


This change is Reviewable

Comment thread test/plug_test.exs Outdated
test "exception re-raises" do
exception = %RuntimeError{message: "Error"}

conn = conn(:get, "/error_route")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do

assert_raises RuntimeError, fn ->
  ExampleApp.call(conn, [])
  |> conn(:get, "/error_route")
end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, good idea

@mitchellhenke mitchellhenke merged commit a8c8fa9 into master Aug 24, 2016
@mitchellhenke mitchellhenke deleted the plug-tests branch August 24, 2016 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants