mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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
|
||||||
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
|
describe '#create_post' do
|
||||||
it "should create a link post when a link is given" do
|
it "should create a link post when a link is given" do
|
||||||
title = 'test post'
|
title = 'test post'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue