Giter Site home page Giter Site logo

Comments (8)

alext avatar alext commented on June 11, 2024

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.

alext avatar alext commented on June 11, 2024

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.

heathd avatar heathd commented on June 11, 2024

Thanks Alex, have you got a pointer to how you used the omniauth test helpers on errbit?

from gds-sso.

benilovj avatar benilovj commented on June 11, 2024

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.

bradwright avatar bradwright commented on June 11, 2024

Unless I'm missing something, dev mode != test mode.

from gds-sso.

benilovj avatar benilovj commented on June 11, 2024

@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.

alext avatar alext commented on June 11, 2024

@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.

heathd avatar heathd commented on June 11, 2024

Alex thanks for the pointers I'll take a look

from gds-sso.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.