Add option to show browser's local time (#1653)
* Add tests for --local-time option * Update Readme
This commit is contained in:
+6
-6
@@ -121,7 +121,7 @@ EOF
|
||||
|
||||
post "/gollum/edit/A", :content => 'def', :page => 'A',
|
||||
:format => page.format, :message => 'def', :etag => old_sha
|
||||
assert_equal last_response.status, 412
|
||||
assert_equal last_response.status, 412
|
||||
end
|
||||
|
||||
test "edit page with empty message" do
|
||||
@@ -328,9 +328,9 @@ EOF
|
||||
page='_Template'
|
||||
post '/gollum/create', :content => 'fake template with some Utf-8: Ü', :page => page,
|
||||
:path => '/', :format => 'markdown', :message => ''
|
||||
follow_redirect!
|
||||
follow_redirect!
|
||||
assert last_response.ok?
|
||||
@wiki.clear_cache
|
||||
@wiki.clear_cache
|
||||
get "/gollum/create/TT"
|
||||
assert last_response.ok?
|
||||
post '/gollum/delete/_Template'
|
||||
@@ -338,7 +338,7 @@ EOF
|
||||
end
|
||||
|
||||
test "create with template succeed if template doesn't exist" do
|
||||
Precious::App.set(:wiki_options, { :template_page => true })
|
||||
Precious::App.set(:wiki_options, { :template_page => true })
|
||||
get "/gollum/create/TT"
|
||||
assert last_response.ok?
|
||||
Precious::App.set(:wiki_options, { :template_page => false })
|
||||
@@ -824,7 +824,7 @@ context "Frontend with lotr" do
|
||||
assert last_response.ok?
|
||||
assert_equal last_response.body.include?('delete-link'), false
|
||||
assert_equal last_response.body.include?('page-info-toggle'), false
|
||||
assert last_response.body.include?('This version of the page was edited by <b>Tom Preston-Werner</b> at 2010-04-07')
|
||||
assert_match %r{This version of the page was edited by <b>Tom Preston-Werner</b> at <time datetime="2010-04-07T19:49:43Z" data-format="%Y-%m-%d %H:%M:%S">\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}</time>.}, last_response.body
|
||||
assert last_response.body.include?("<a href=\"/Bilbo-Baggins.md\">View the most recent version.</a></p>")
|
||||
end
|
||||
|
||||
@@ -995,5 +995,5 @@ context 'Frontend with base path' do
|
||||
|
||||
def app
|
||||
Precious::MapGollum.new(@base_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user