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

Testing external module with acceptance test #298

Open
rzepetor opened this issue Jan 10, 2022 · 2 comments
Open

Testing external module with acceptance test #298

rzepetor opened this issue Jan 10, 2022 · 2 comments
Labels
question Asking a question about Sorcery

Comments

@rzepetor
Copy link

Is it possible to test external module like Facebook using acceptance test with sorcery without touching Facebook? (in isolation)

@joshbuker joshbuker added the question Asking a question about Sorcery label Jan 10, 2022
@joshbuker
Copy link
Member

I assume you're asking about test helpers to mock hitting an OAuth provider (e.g. Facebook) without actually hitting the provider?

Unfortunately, no, I don't believe Sorcery provides built-in support for that. You can however use other gems to mock API calls/responses, which should work.

For Sorcery v1, I plan on migrating Sorcery to using OmniAuth for OAuth integration, which does have built-in mocking: https://github.com/omniauth/omniauth/wiki/Integration-Testing

@DataDaoDe
Copy link

Having omniauth-like testing funcationality built-in would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking a question about Sorcery
Projects
None yet
Development

No branches or pull requests

3 participants