fix previews
This commit is contained in:
@@ -81,11 +81,9 @@ module Precious
|
||||
end
|
||||
|
||||
post '/preview' do
|
||||
@name = params['page']
|
||||
format = params['format']
|
||||
data = params['content']
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
@page = wiki.preview_page("Preview", data, format)
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path)
|
||||
@name = "Preview"
|
||||
@page = wiki.preview_page(@name, params[:content], params[:format])
|
||||
@content = @page.formatted_data
|
||||
mustache :page
|
||||
end
|
||||
|
||||
@@ -39,6 +39,10 @@ context "Frontend" do
|
||||
assert_equal 'def', page.version.message
|
||||
end
|
||||
|
||||
test "previews content" do
|
||||
post "/preview", :content => 'abc', :format => 'markdown'
|
||||
end
|
||||
|
||||
def app
|
||||
Precious::App
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user