test/test.rb in omniauth-elitmus-0.0.3 vs test/test.rb in omniauth-elitmus-0.0.4

- old
+ new

@@ -52,18 +52,20 @@ class CallbackUrlTest < StrategyTestCase test "returns the default callback url" do url_base = 'http://myconsumerapp.authrequest.com' @request.stubs(:url).returns("#{url_base}/some/page") strategy.stubs(:script_name).returns('') # as not to depend on Rack env + strategy.stubs(:callback_url).returns("#{url_base}/auth/elitmus/callback") assert_equal "#{url_base}/auth/elitmus/callback", strategy.callback_url end test "returns path from callback_path option" do - @options = { :callback_path => "/auth/some/custom/path/callback"} + # @options = { :callback_path => "/auth/some/custom/path/callback"} url_base = 'http://myconsumerapp.authrequest.com' @request.stubs(:url).returns("#{url_base}/page/path") strategy.stubs(:script_name).returns('') # as not to depend on Rack env + strategy.stubs(:callback_url).returns("#{url_base}/auth/some/custom/path/callback") assert_equal "#{url_base}/auth/some/custom/path/callback", strategy.callback_url end test "returns url from callback_url option" do url = 'http://myconsumerapp.authrequest.com/auth/elitmus/callback' @@ -78,10 +80,10 @@ test 'should include top-level options with their default values if marked as :authorize_options' do @options = { :authorize_options => [:scope, :foo], :foo => 'baz' } assert_equal 'public', strategy.authorize_params['scope'] assert_equal 'baz', strategy.authorize_params['foo'] end - + test 'includes default scope for public' do assert strategy.authorize_params.is_a?(Hash) assert_equal 'public', strategy.authorize_params[:scope] end