Upgrade to Rails 0.14.2; fixed a failing functional test

This commit is contained in:
Alexey Verkhovsky 2005-11-02 04:55:06 +00:00
parent e1d7b26be2
commit 3703c1e1b3
2 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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