Corrected a copy/paste bug in tests, and corresponding problems in rollback.rhtml
This commit is contained in:
parent
1fa143f5d4
commit
beeed3eee6
|
@ -46,7 +46,7 @@
|
|||
<% if @page.revisions.length > 1 %>
|
||||
|
|
||||
<%= link_to('Back in time',
|
||||
{:web => @web.address, :action => 'edit', :id => @page.name,
|
||||
{:web => @web.address, :action => 'revision', :id => @page.name,
|
||||
:rev => @page.revisions.length - 2},
|
||||
{:class => 'navlink', :accesskey => 'R'})
|
||||
%>
|
||||
|
|
|
@ -6,17 +6,24 @@
|
|||
|
||||
<%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{@params["msg"]}</small></p>" if @params["msg"] %>
|
||||
|
||||
<form id="editForm" action="../save/<%= @page.url %>" method="post" onSubmit="cleanAuthorName();">
|
||||
<%= form_tag({:web => @web.address, :action => 'save', :id => @page.name},
|
||||
{:id => 'editForm', :method => 'post', :onSubmit => 'cleanAuthorName();'})
|
||||
%>
|
||||
<p>
|
||||
<textarea name="content" style="font-size: 12px; width: 450px; height: 500px"><%= @revision.content %></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Update"> as
|
||||
<input type="submit" value="Update" accesskey="u" /> as
|
||||
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
||||
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
|
||||
| <a href="../cancel_edit/<%= @page.url %>">Cancel</a> <small>(unlocks page)</small>
|
||||
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
|
||||
|
|
||||
<% link_to('Cancel',
|
||||
{:web => @web.address, :action => 'cancel_edit', :id => @page.name},
|
||||
{:accesskey => 'c'})
|
||||
%>
|
||||
<small>(unlocks page)</small>
|
||||
</p>
|
||||
</form>
|
||||
<%= end_form_tag %>
|
||||
|
||||
<%= render("#{@web.markup}_help") if @web %>
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ class WikiControllerTest < Test::Unit::TestCase
|
|||
def test_rollback
|
||||
# rollback shows a form where a revision can be edited.
|
||||
# its assigns the same as or revision
|
||||
r = process 'revision', 'web' => 'wiki1', 'id' => 'HomePage', 'rev' => '0'
|
||||
r = process 'rollback', 'web' => 'wiki1', 'id' => 'HomePage', 'rev' => '0'
|
||||
|
||||
assert_success
|
||||
assert_equal @home, r.template_objects['page']
|
||||
|
|
Loading…
Reference in a new issue