diff options
author | seb <seb@seb-U36JC> | 2011-11-24 09:21:36 +0000 |
---|---|---|
committer | seb <seb@seb-U36JC> | 2011-11-24 09:21:36 +0000 |
commit | a4e533f1588a5d34dca4ab462b58ddd83eed37c5 (patch) | |
tree | 58bb3b57ec5664e094ae151c18b6c1915256e364 /spec/spec_helper.rb | |
parent | d473fce1d0451c913d3ef697d3b45bd58c6fff54 (diff) | |
parent | e649c2a7f19d0a75206149d886ff47b3ccda4e91 (diff) |
Merge branch 'develop' into xapian-dcabo
Conflicts:
spec/models/xapian_spec.rb
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b4471afc1..d1b3083c4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -113,9 +113,9 @@ def validate_as_body(html) "<html><head><title>Test</title></head><body>#{html}</body></html>") end -def basic_auth_login(request) - username = MySociety::Config.get('ADMIN_USERNAME') - password = MySociety::Config.get('ADMIN_PASSWORD') +def basic_auth_login(request, username = nil, password = nil) + username = MySociety::Config.get('ADMIN_USERNAME') if username.nil? + password = MySociety::Config.get('ADMIN_PASSWORD') if password.nil? request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("#{username}:#{password}") end @@ -148,7 +148,7 @@ if $tempfilecount.nil? end def load_raw_emails_data(raw_emails) - raw_email = raw_emails(:useless_raw_email) + raw_email = raw_emails(:useless_raw_email) begin raw_email.destroy_file_representation! rescue Errno::ENOENT |