mirror of
https://github.com/simi/omniauth-facebook.git
synced 2022-11-09 12:32:45 -05:00
add tests for removing query string and prep for 3.0.0 release
This commit is contained in:
parent
5a74e8b80e
commit
8828dea865
2 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
||||||
## 2.1.0 (unreleased)
|
## 3.0.0 (2015-10-26)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Remove query string from redirect_uri on callback by default (#221, @gioblu)
|
||||||
- Signed request parsing extracted to `OmniAuth::Facebook::SignedRequest` class. (#183, @simi, @Vrael)
|
- Signed request parsing extracted to `OmniAuth::Facebook::SignedRequest` class. (#183, @simi, @Vrael)
|
||||||
- Change default value of `info_fields` to `name,email` for the [graph-api-v2.4](https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/). ([#209](https://github.com/mkdynamic/omniauth-facebook/pull/209))
|
- Change default value of `info_fields` to `name,email` for the [graph-api-v2.4](https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/). ([#209](https://github.com/mkdynamic/omniauth-facebook/pull/209))
|
||||||
|
|
||||||
|
|
|
@ -24,18 +24,20 @@ class ClientTest < StrategyTestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
class CallbackUrlTest < StrategyTestCase
|
class CallbackUrlTest < StrategyTestCase
|
||||||
test "returns the default callback url" do
|
test "returns the default callback url (omitting querystring)" do
|
||||||
url_base = 'http://auth.request.com'
|
url_base = 'http://auth.request.com'
|
||||||
@request.stubs(:url).returns("#{url_base}/some/page")
|
@request.stubs(:url).returns("#{url_base}/some/page")
|
||||||
strategy.stubs(:script_name).returns('') # as not to depend on Rack env
|
strategy.stubs(:script_name).returns('') # as not to depend on Rack env
|
||||||
|
strategy.stubs(:query_string).returns('?foo=bar')
|
||||||
assert_equal "#{url_base}/auth/facebook/callback", strategy.callback_url
|
assert_equal "#{url_base}/auth/facebook/callback", strategy.callback_url
|
||||||
end
|
end
|
||||||
|
|
||||||
test "returns path from callback_path option" do
|
test "returns path from callback_path option (omitting querystring)" do
|
||||||
@options = { :callback_path => "/auth/FB/done"}
|
@options = { :callback_path => "/auth/FB/done"}
|
||||||
url_base = 'http://auth.request.com'
|
url_base = 'http://auth.request.com'
|
||||||
@request.stubs(:url).returns("#{url_base}/page/path")
|
@request.stubs(:url).returns("#{url_base}/page/path")
|
||||||
strategy.stubs(:script_name).returns('') # as not to depend on Rack env
|
strategy.stubs(:script_name).returns('') # as not to depend on Rack env
|
||||||
|
strategy.stubs(:query_string).returns('?foo=bar')
|
||||||
assert_equal "#{url_base}/auth/FB/done", strategy.callback_url
|
assert_equal "#{url_base}/auth/FB/done", strategy.callback_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue