sorcery icon indicating copy to clipboard operation
sorcery copied to clipboard

Testing external module with acceptance test

Open rzepetor opened this issue 3 years ago • 2 comments

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

rzepetor avatar Jan 10 '22 20:01 rzepetor

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

joshbuker avatar Jan 10 '22 20:01 joshbuker

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

DataDaoDe avatar Nov 23 '22 22:11 DataDaoDe