Skip to content

Commit

Permalink
Merge pull request #120 from alphagov/bugfix-mock_gds_sso_api_access
Browse files Browse the repository at this point in the history
reuse dummy-user for running with mock_gds_sso_api_access
  • Loading branch information
benilovj committed Jan 6, 2014
2 parents 99712a7 + b008a7f commit 2964547
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/user.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2964547

Please sign in to comment.