forked from swelham/ueberauth_microsoft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to lc param in handle_request
- Loading branch information
1 parent
335e877
commit 5ed220c
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
defmodule Ueberauth.Strategy.MicrosoftTest do | ||
use ExUnit.Case, async: true | ||
use Plug.Test | ||
|
||
test "lc param is present in the redirect uri" do | ||
conn = conn(:get, "/auth/microsoft", %{lc: 10}) | ||
routes = Ueberauth.init() | ||
resp = Ueberauth.call(conn, routes) | ||
assert [location] = get_resp_header(resp, "location") | ||
redirect_uri = URI.parse(location) | ||
assert Plug.Conn.Query.decode(redirect_uri.query)["lc"] == "10" | ||
end | ||
end |