Proper last edit info

but it can be slow if page modified so many times
This commit is contained in:
Jeong, Heon
2012-05-20 11:56:15 +09:00
parent f7d3f6b3f0
commit 60dbe9d0a7
2 changed files with 21 additions and 5 deletions
+17 -1
View File
@@ -15,7 +15,23 @@ context "Frontend" do
FileUtils.rm_rf(@path)
end
test "edits page" do
test "committer remains same if page didn't modified" do
@wiki.write_page('CC', :markdown, 'asdf',
{ :name => "asdf", :email => "news@nomail.com" });
get '/CC'
assert_match /Last edited by <b>asdf/, last_response.body
@wiki.write_page('DD', :markdown, 'asdf',
{ :name => "news", :email => "asdf@nomail.com" });
get '/DD'
assert_match /Last edited by <b>news/, last_response.body
get '/CC'
assert_match /Last edited by <b>asdf/, last_response.body
end
test "edits page" do
page_1 = @wiki.page('A')
post "/edit/A", :content => 'abc',
:format => page_1.format, :message => 'def'