aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/errors_spec.rb9
-rw-r--r--spec/integration/search_request_spec.rb4
2 files changed, 8 insertions, 5 deletions
diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb
index 705c1fff8..d03323445 100644
--- a/spec/integration/errors_spec.rb
+++ b/spec/integration/errors_spec.rb
@@ -46,10 +46,13 @@ describe "When rendering errors" do
response.code.should == "500"
end
it "should render a 403 for attempts at directory listing for attachments" do
- get("/request/5/response/4/attach/html/3/" )
- response.code.should == "403"
- get("/request/5/response/4/attach/html" )
+ # make a fake cache
+ foi_cache_path = File.join(File.dirname(__FILE__), '../../cache')
+ FileUtils.mkdir_p(File.join(foi_cache_path, "views/en/request/101/101/response/1/attach/html/1"))
+ get("/request/101/response/1/attach/html/1/" )
response.code.should == "403"
+ get("/request/101/response/1/attach/html" )
+ response.code.should == "403"
end
it "should render a 404 for non-existent 'details' pages for requests" do
get("/details/request/wobble" )
diff --git a/spec/integration/search_request_spec.rb b/spec/integration/search_request_spec.rb
index 07839af32..5733dea22 100644
--- a/spec/integration/search_request_spec.rb
+++ b/spec/integration/search_request_spec.rb
@@ -48,7 +48,7 @@ describe "When searching" do
request_via_redirect("post", "/search",
:query => "bob",
:latest_status => ['successful'])
- response.body.should include("no requests matching your query")
+ response.body.should include("no results matching your query")
end
it "should correctly filter searches for comments" do
@@ -60,7 +60,7 @@ describe "When searching" do
request_via_redirect("post", "/search",
:query => "daftest",
:request_variety => ['response','sent'])
- response.body.should include("no requests matching your query")
+ response.body.should include("no results matching your query")
end
end