Skip to content

Commit

Permalink
Merge pull request #25 from KazuCocoa/update_plug_to_1_0_0
Browse files Browse the repository at this point in the history
update plug and fix test using lowercase because header should lowercase on plug v0.13.0
  • Loading branch information
scrogson committed Aug 19, 2015
2 parents 472cbf8 + 3a867e0 commit e08ab0c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defmodule OAuth2.Mixfile do
{:httpoison, "~> 0.6"},
{:poison, "~> 1.3"},
{:cowboy, "~> 1.0", only: :test},
{:plug, "~> 0.12"},
{:plug, "~> 1.0"},

# Docs dependencies
{:earmark, "~> 0.1", only: :docs},
Expand Down
6 changes: 3 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
%{"cowboy": {:hex, :cowboy, "1.0.0"},
%{"cowboy": {:hex, :cowboy, "1.0.2"},
"cowlib": {:hex, :cowlib, "1.0.1"},
"earmark": {:hex, :earmark, "0.1.15"},
"ex_doc": {:hex, :ex_doc, "0.7.2"},
"hackney": {:hex, :hackney, "1.0.6"},
"httpoison": {:hex, :httpoison, "0.6.2"},
"idna": {:hex, :idna, "1.0.2"},
"plug": {:hex, :plug, "0.12.0"},
"plug": {:hex, :plug, "1.0.0"},
"poison": {:hex, :poison, "1.3.1"},
"ranch": {:hex, :ranch, "1.0.0"},
"ranch": {:hex, :ranch, "1.1.0"},
"ssl_verify_hostname": {:hex, :ssl_verify_hostname, "1.0.1"}}
4 changes: 2 additions & 2 deletions test/oauth2/strategy/auth_code_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ defmodule OAuth2.Strategy.AuthCodeTest do
Plug.Adapters.Cowboy.http Client, [], port: 4998

conn = call(Client, conn(:get, "/auth"))
[location] = get_resp_header conn, "Location"
[location] = get_resp_header conn, "location"
conn = call(Provider, conn(:get, location))
assert conn.status == 302

[location] = get_resp_header conn, "Location"
[location] = get_resp_header conn, "location"
conn = call(Client, conn(:get, location))
assert conn.params["code"] == "1234"

Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Provider do
get "/oauth/authorize" do
redirect_uri = conn.params["redirect_uri"]
conn
|> put_resp_header("Location", redirect_uri <> "?" <> "code=1234")
|> put_resp_header("location", redirect_uri <> "?" <> "code=1234")
|> send_resp(302, "")
end

Expand Down Expand Up @@ -47,7 +47,7 @@ defmodule Client do

get "/auth" do
conn
|> put_resp_header("Location", OAuth2.Client.authorize_url!(client(conn)))
|> put_resp_header("location", OAuth2.Client.authorize_url!(client(conn)))
|> send_resp(302, "")
end

Expand Down

0 comments on commit e08ab0c

Please sign in to comment.