lib/gds-sso/warden_config.rb in gds-sso-9.2.1 vs lib/gds-sso/warden_config.rb in gds-sso-9.2.2

- old
+ new

@@ -169,15 +169,16 @@ def authenticate! logger.debug("Authenticating with mock_gds_sso_api_access strategy") dummy_api_user = GDS::SSO.test_user || GDS::SSO::Config.user_klass.where(email: "dummyapiuser@domain.com").first if dummy_api_user.nil? - dummy_api_user = GDS::SSO::Config.user_klass.create!( + dummy_api_user = GDS::SSO::Config.user_klass.new( email: "dummyapiuser@domain.com", uid: "#{rand(10000)}", name: "Dummy API user created by gds-sso", - permissions: ["signin"], as: :oauth) + dummy_api_user.permissions = ["signin"] + dummy_api_user.save! end success!(dummy_api_user) end end