lib/gds-sso/warden_config.rb in gds-sso-2.1.0 vs lib/gds-sso/warden_config.rb in gds-sso-3.0.0

- old
+ new

@@ -188,12 +188,12 @@ test_user = GDS::SSO.test_user test_user ||= ENV['GDS_SSO_MOCK_INVALID'].present? ? nil : GDS::SSO::Config.user_klass.first if test_user # Brute force ensure test user has correct perms to signin - if ! test_user.has_permission?(GDS::SSO::Config.default_scope, "signin") - permissions = test_user.permissions || {} - test_user.update_attribute(:permissions, permissions.merge({ GDS::SSO::Config.default_scope => ["signin"] })) + if ! test_user.has_permission?("signin") + permissions = test_user.permissions || [] + test_user.update_attribute(:permissions, permissions << ["signin"]) end success!(test_user) else if Rails.env.test? && ENV['GDS_SSO_MOCK_INVALID'].present? fail!(:invalid)