diff options
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/admin_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/errors_spec.rb | 13 | ||||
-rw-r--r-- | spec/integration/search_request_spec.rb | 6 |
3 files changed, 3 insertions, 18 deletions
diff --git a/spec/integration/admin_spec.rb b/spec/integration/admin_spec.rb index e148ea3ca..8a5e59ba2 100644 --- a/spec/integration/admin_spec.rb +++ b/spec/integration/admin_spec.rb @@ -13,7 +13,7 @@ describe "When administering the site" do # Now fetch the "log in as" link to log in as Bob get_via_redirect "/admin/user/login_as/#{users(:bob_smith_user).id}", nil, { - "Authorization" => "Basic " + Base64.encode64("#{Configuration::admin_username}:#{Configuration::admin_password}").strip + "Authorization" => "Basic " + Base64.encode64("#{AlaveteliConfiguration::admin_username}:#{AlaveteliConfiguration::admin_password}").strip } response.should be_success session[:user_id].should == users(:bob_smith_user).id diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb index a44ed7051..edf570182 100644 --- a/spec/integration/errors_spec.rb +++ b/spec/integration/errors_spec.rb @@ -4,26 +4,14 @@ describe "When rendering errors" do before(:each) do load_raw_emails_data - ActionController::Base.consider_all_requests_local = false end - after(:each) do - ActionController::Base.consider_all_requests_local = true - end - - it "should render a 404 for unrouteable URLs" do - get("/frobsnasm") - response.body.should include("The page doesn't exist") - response.code.should == "404" - end it "should render a 404 for users that don't exist" do get("/user/wobsnasm") - response.body.should include("The page doesn't exist") response.code.should == "404" end it "should render a 404 for bodies that don't exist" do get("/body/wobsnasm") - response.body.should include("The page doesn't exist") response.code.should == "404" end it "should render a 500 for general errors" do @@ -46,7 +34,6 @@ describe "When rendering errors" do end it "should render a 404 for non-existent 'details' pages for requests" do get("/details/request/wobble" ) - response.body.should include("The page doesn't exist") response.code.should == "404" end end diff --git a/spec/integration/search_request_spec.rb b/spec/integration/search_request_spec.rb index c564032a6..23a62e97b 100644 --- a/spec/integration/search_request_spec.rb +++ b/spec/integration/search_request_spec.rb @@ -13,10 +13,8 @@ describe "When searching" do end it "should redirect requests with search in query string to URL-based page" do - url = '/search/all?query=bob' - request_via_redirect("post", url) - response.request.url.should_not include(url) - response.request.url.should include("/search/bob/all") + post '/search/all?query=bob' + response.should redirect_to "/en/search/bob/all" end it "should correctly execute simple search" do |