aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/request_controller_spec.rb3
-rw-r--r--spec/spec_helper.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 642f5c754..32e14cd52 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'json'
@@ -239,10 +240,10 @@ describe RequestController, "when showing one request" do
get :download_entire_request, :url_title => title
assigns[:url_path].should have_text(/#{title}.zip$/)
response.location.should have_text(/#{assigns[:url_path]}/)
- assigns[:url_path].should_not == old_path
zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", assigns[:url_path])) { |zipfile|
zipfile.count.should == 4
}
+ assigns[:url_path].should_not == old_path
end
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0fb589705..83ebef937 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -111,7 +111,7 @@ def validate_as_body(html)
end
def basic_auth_login(request, username = nil, password = nil)
- username = MySociety::Config.get('ADMIN_USERNAME') if username.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