Sha256: f3b263c9d6727a9667178c7997af274eb9c9b781d29f6ec067272ae2e7ff0a23

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

# -*- encoding : utf-8 -*-

RSpec.describe Card::Set::Right::Structure do
  it "one_line_content is rendered as type + raw" do
    template = Card.new name: "A+*right+*structure",
                        content: "[[link]] {{nest}}"
    expect(template.format._render(:one_line_content))
      .to have_tag "div.text-muted.one-line" do
        with_tag "a.cardtype.known-card", with: { href: "/RichText" }, text: "RichText"
        with_text(/ \: \[\[link\]\] \{\{nest\}\}/)
      end
  end

  it "one_line_content is rendered as type + raw" do
    template = Card.new name: "A+*right+*structure", type: "Html",
                        content: "[[link]] {{nest}}"
    expect(template.format._render(:one_line_content))
      .to have_tag "div.text-muted.one-line" do
      with_tag "a.cardtype.known-card", with: { href: "/HTML" }, text: "HTML"
      with_text(/ \: \[\[link\]\] \{\{nest\}\}/)
    end
  end

  # it 'renders core as raw' do
  #     trs = Card.fetch('*type+*right+*structure').format.render_core
  #     expect(trs).to eq '{"type":"_left"}'
  # end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
card-1.100.0 mod/settings/spec/set/right/structure_spec.rb
card-1.99.6 mod/settings/spec/set/right/structure_spec.rb
card-1.99.5 mod/settings/spec/set/right/structure_spec.rb
card-1.99.4 mod/settings/spec/set/right/structure_spec.rb
card-1.99.3 mod/settings/spec/set/right/structure_spec.rb
card-1.99.2 mod/settings/spec/set/right/structure_spec.rb
card-1.99.1 mod/settings/spec/set/right/structure_spec.rb
card-1.99.0 mod/settings/spec/set/right/structure_spec.rb