#124 Test omniauth login with controller (integration) tests

13/04/2023
omniauth oauth2 rails testing oauth testing

Testing is a very important part of app development that I haven't covered a lot before.

Previously we've added oAuth login for Microsoft & Github. Now, let's mock omniauth authentication with both oAuth providers in our tests.

Episode source code: https://github.com/corsego/124-test-omniauth/commit/66d848b5405457704e8411865b3f7812b8d43262
Based on this blogpost: https://blog.corsego.com/testing-omniauth

0:00 walk through initial app setup
1:30 run test suite, fix errors
3:40 test Github omniauth authentication
6:04 test Microsoft Azure omniauth authentication
9:17 final test run

0
Join the conversation
Sign in to access PRO lessons, access private repos, leave comments, create watch lists.
We collect your email address, name and username to create your account. We do not share your email address with anyone else.