Comments (8)
I agree that the current mock strategies are sub-optimal. For test mode, we could look at moving to use the omniauth test helpers - I took this approach in errbit (I couldn't use gds-sso becuase it doesn't play nicely with devise, so I had to just use omniauth-gds directly).
from gds-sso.
In dev mode, maybe we should move towards not mocking out auth at all, and just make apps auth against signon properly.
from gds-sso.
Thanks Alex, have you got a pointer to how you used the omniauth test helpers on errbit?
from gds-sso.
In dev mode, maybe we should move towards not mocking out auth at all, and just make apps auth against signon properly.
My concern is that this change will require more faffing to get from a blank slate to passing tests a working setup. Also, since almost all user models are DB-backed, won't this make tests slower?
from gds-sso.
Unless I'm missing something, dev mode != test mode.
from gds-sso.
@bradleywright oops sorry, my brain did a thing there, you're right (fixed my comment). But at least the faffing part is still a valid question IMHO.
from gds-sso.
@heathd The acceptance spec for gds-sso auth is https://github.com/alphagov/errbit/blob/master/spec/acceptance/auth_with_gds_sso_spec.rb. It uses test helpers defined in https://github.com/alphagov/errbit/blob/master/spec/acceptance/acceptance_helper.rb and https://github.com/alphagov/errbit/blob/master/spec/support/gds_auth_stubs.rb
from gds-sso.
Alex thanks for the pointers I'll take a look
from gds-sso.
Related Issues (11)
- Supporting Rails 5 HOT 2
- Determining "API" calls HOT 1
- Permission sync errors due to CSRF protection
- License missing from gemspec HOT 2
- Rails 4 update_attributes no longer takes an options param HOT 3
- Test failures when Rails load version 4.0 but the specs are written for 3.0 HOT 1
- Should we be loading a mock gds_bearer_token strategy in dev? HOT 1
- Stubbed mix-in for applications to use in their own functional tests HOT 1
- Behaviour in test and development environments HOT 1
- End support for unused Ruby / Rails versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gds-sso.