mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
add volunteers helper
This commit is contained in:
parent
2e0f7e9b42
commit
d9925f00e9
5 changed files with 64 additions and 0 deletions
20
spec/helpers/format_helper_spec.rb
Normal file
20
spec/helpers/format_helper_spec.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe FormatHelper, type: :helper do
|
||||
|
||||
describe 'markdown' do
|
||||
it 'should return empty string for nil' do
|
||||
expect(markdown(nil)).to eq ''
|
||||
end
|
||||
|
||||
it 'should return HTML for header markdown' do
|
||||
expect(Redcarpet::Markdown).to receive(:new).
|
||||
with(Redcarpet::Render::HTML, autolink: true,
|
||||
space_after_headers: true,
|
||||
no_intra_emphasis: true).
|
||||
and_call_original
|
||||
|
||||
expect(markdown('# this is my header')).to eq "<h1>this is my header</h1>\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue