class OmniAuthRoutesTest

Constants

ExpectedUrlGeneratiorError

Public Instance Methods

assert_path(action, provider, with_param=true) click to toggle source
# File test/omniauth/url_helpers_test.rb, line 9
def assert_path(action, provider, with_param=true)
  # Resource param
  assert_equal @controller.send(action, :user, provider),
               @controller.send("user_#{action}", provider)

  # With an object
  assert_equal @controller.send(action, User.new, provider),
               @controller.send("user_#{action}", provider)

  if with_param
    # Default url params
    assert_equal @controller.send(action, :user, provider, param: 123),
                 @controller.send("user_#{action}", provider, param: 123)
  end
end