Sha256: cc27ad15d5cdf2c4daf8c29c7ed64cbe66c4a1ff491b413e5696a5fce05d0858

Contents?: true

Size: 713 Bytes

Versions: 2

Compression:

Stored size: 713 Bytes

Contents

require 'spec_helper'

describe Flms::ParagraphLayerViewObject do
  let(:paragraph_layer) { create :paragraph_layer, color: 'abc',
                                 header: 'header text', body: 'body text' }
  let(:subject) { Flms::ParagraphLayerViewObject.new(paragraph_layer) }

  describe 'attributes' do
    let(:data) { subject.attributes }

    it 'should include color styling' do
      expect(data).to have_key :style
      expect(data[:style]).to match 'color: #abc;'
    end

    it 'should include basic attributes' do
      expect(data).to have_key 'data-0'
      expect(data).to have_key 'data-100'
      expect(data).to have_key 'data-200'
      expect(data).to have_key 'data-300'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 spec/view_objects/paragraph_layer_view_object_spec.rb
flms-0.1.0 spec/view_objects/paragraph_layer_view_object_spec.rb