Skip to content
Browse files

Merge pull request #120 from alphagov/bugfix-mock_gds_sso_api_access

reuse dummy-user for running with mock_gds_sso_api_access
  • Loading branch information...
2 parents 99712a7 + b008a7f commit 2964547ba6dbba3a3f2c01a9dc78a2330d454ec8 @benilovj benilovj committed Jan 6, 2014
Showing with 6 additions and 1 deletion.
  1. +5 −0 app/models/user.rb
  2. +1 −1 lib/tasks/user.rake
View
5 app/models/user.rb
@@ -30,6 +30,11 @@ def self.first
User.new(auth_hash)
end
+ # only used by the mock_gds_sso_api_access
+ def self.find_by_email(email)
+ first
+ end
+
def remotely_signed_out?
remotely_signed_out
end
View
2 lib/tasks/user.rake
@@ -5,7 +5,7 @@ namespace :users do
"uid" => 'dummy-user',
"name" => 'Ms Example',
"email" => 'example@example.com',
- "permissions" => ['single_points_of_contact', 'feedex']
+ "permissions" => ['single_points_of_contact', 'feedex', 'api_users']
)
puts "Created dummy user: #{user}"
end

0 comments on commit 2964547

Please sign in to comment.
Something went wrong with that request. Please try again.