osem-fcy/spec/helpers/format_helper_spec.rb
2022-03-17 16:13:47 -07:00

16 lines
365 B
Ruby

# frozen_string_literal: true
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(markdown('# this is my header')).to eq "<h1>this is my header</h1>\n"
end
end
end