Skip to content

Commit

Permalink
update admin login for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Rossi committed Dec 16, 2015
1 parent 02e8e21 commit 422918a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ development:

test:
<<: *default
admin:
username: test
password: test

production:
<<: *default
Expand Down
3 changes: 2 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
end

def login
@request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("oneocean:conserveworld")
credentials = Rails.application.secrets.admin
@request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("#{credentials['username']}:#{credentials['password']}")
end

0 comments on commit 422918a

Please sign in to comment.