Skip to content

How to test? #12

@iainbryson

Description

@iainbryson

HI there,

I've (finally) gotten minitest of doorkeeper before_action :doorkeeper_authorize! protected controllers by creating the user/oauth_application/access_token with all the proper fields working.

When I move to before_action :authenticate_user! with devise-doorkeeper, it fails with:

Expected response to be a <2XX: success>, but was a <401: Unauthorized>
Response body: {"error":"You need to sign in or sign up before continuing."}

The same controller code with authenticate_user! works fine outside the test. Is there anything else to consider in the testing? Or an example?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions