Sha256: 9da95b25435db953bccf1bddacdd2757198563a428fabffabb4eecdd25228db3
Contents?: true
Size: 612 Bytes
Versions: 1
Compression:
Stored size: 612 Bytes
Contents
# frozen_string_literal: true require_relative '../lib/storyblok/richtext' describe 'richtext' do it 'styled mark to add span with red class' do doc = { 'type' => 'doc', 'content' => [ { 'text' => 'red text', 'type' => 'text', 'marks' => [ { 'type' => 'styled', 'attrs' => { 'class' => 'red' } } ] } ] } renderer = Storyblok::Richtext::HtmlRenderer.new expect(renderer.render(doc)).to eq('<span class="red">red text</span>') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
storyblok-richtext-renderer-0.0.5 | spec/richtext_spec.rb |