From 3703c1e1b328daa93592d6b55a4cf32fc6d88fad Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Wed, 2 Nov 2005 04:55:06 +0000 Subject: [PATCH] Upgrade to Rails 0.14.2; fixed a failing functional test --- app/controllers/wiki_controller.rb | 7 +++++-- test/functional/wiki_controller_test.rb | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index d2bec178..712c4640 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -195,11 +195,14 @@ class WikiController < ApplicationController end def published - render_text("Published version of web '#{@web_name}' is not available", 404) and return if not @web.published? + if not @web.published? + render(:text => "Published version of web '#{@web_name}' is not available", :status => 404) + return + end page_name = @page_name || 'HomePage' page = wiki.read_page(@web_name, page_name) - render_text("Page '#{page_name}' not found", 404) and return unless page + render(:text => "Page '#{page_name}' not found", status => 404) and return unless page @renderer = PageRenderer.new(page.revisions.last) end diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 70654b50..50eeeaea 100755 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -288,7 +288,7 @@ class WikiControllerTest < Test::Unit::TestCase r = process('published', 'web' => 'wiki1', 'id' => 'HomePage') - assert_redirected_to :action => 'show', :id => 'HomePage' + assert_response :missing end