Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose token_from_user for use in tests #23

Open
marcqualie opened this issue Jan 23, 2021 · 2 comments
Open

Expose token_from_user for use in tests #23

marcqualie opened this issue Jan 23, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@marcqualie
Copy link
Contributor

I'm currently integration tokenable into a rails app and want to write tests to check for valid vs invalid tokens and the responses.

Currently I can't find an easy way to generate a valid token for a user since the token_from_user method is inside the controller.

@marcqualie marcqualie added the enhancement New feature or request label Jan 23, 2021
@scottrobertson
Copy link
Contributor

Can't you just include Tokenable::Authable, and use the method?

@scottrobertson
Copy link
Contributor

Does it make sense to move this to a user method instead maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants