mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
fixup! implement preview
This commit is contained in:
parent
01a7ad64d7
commit
60563c6ecf
1 changed files with 10 additions and 0 deletions
|
|
@ -167,6 +167,16 @@ RSpec.describe HarpBlog do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#preview_post" do
|
||||
it "should return some HTML" do
|
||||
@blog.compile
|
||||
first_post_path = File.join(TEST_BLOG_PATH, 'www/posts/2006/02/first-post/index.html')
|
||||
expected_html = File.read(first_post_path)
|
||||
html = @blog.preview_post('2006', '02', 'first-post')
|
||||
expect(html).to eq(expected_html)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#create_post' do
|
||||
it "should create a link post when a link is given" do
|
||||
title = 'test post'
|
||||
|
|
|
|||
Loading…
Reference in a new issue