server/tests/common.rb
def require_authentication?(uri)
    # We need to make sure we don't have both API_USER and API_PASSWORD
    # set in the environment; otherwise LazyAuth will use those instead
    # of asking for credentials
    api_user = ENV.delete("API_USER")
    get uri, {}
    ENV["API_USER"] = api_user
    last_response.status == 401
  end
# Check if given URI require authentication
Check if given URI require authentication
Check if given URI require authentication
def require_authentication?(uri)
    api_user = ENV.delete("API_USER")
    get uri, {}
    ENV["API_USER"] = api_user
    last_response.status == 401
  end
def require_authentication? ( uri ) api_user = ENV . delete ( "API_USER" ) get uri , { } ENV [ "API_USER" ] = api_user last_response . status == 401 end
Check if given URI require authentication
Check if given URI require authentication
# We need to make sure we don't have both API_USER and API_PASSWORD # set in the environment; otherwise LazyAuth will use those instead # of asking for credentials
uri