Sha256: 21a1fc7ad12a759d76376fa49ec91463c705cc1ffb91ac0c186889d1e7a9329c

Contents?: true

Size: 892 Bytes

Versions: 16

Compression:

Stored size: 892 Bytes

Contents

require 'spec_helper'

describe Qbrick::AccordionBrick, type: :model do
  let :accordion_brick do
    Qbrick::AccordionBrick.new
  end

  describe '#user_can_delete?' do
    it 'returns true' do
      expect(accordion_brick.user_can_delete?).to be_truthy
    end
  end

  describe '#renders_own_childs?' do
    it 'returns false' do
      expect(accordion_brick.renders_own_childs?).to be_falsey
    end
  end

  describe '#bricks' do
    it 'can have childs' do
      expect(accordion_brick).to respond_to(:bricks)
    end
  end

  describe '#to_style_class' do
    it 'includes the bootstrap classname' do
      expect(accordion_brick.to_style_class).to eq('qbrick-accordion-brick accordion')
    end
  end

  describe '#allowed_brick_types' do
    it 'only allows AccordionItems' do
      expect(accordion_brick.allowed_brick_types).to eq(%w(Qbrick::AccordionItemBrick))
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
qbrick-2.7.1 spec/models/accordion_brick_spec.rb
qbrick-2.7 spec/models/accordion_brick_spec.rb
qbrick-2.6.10 spec/models/accordion_brick_spec.rb
qbrick-2.6.9 spec/models/accordion_brick_spec.rb
qbrick-2.6.8 spec/models/accordion_brick_spec.rb
qbrick-2.6.7 spec/models/accordion_brick_spec.rb
qbrick-2.6.6 spec/models/accordion_brick_spec.rb
qbrick-2.6.5 spec/models/accordion_brick_spec.rb
qbrick-2.6.4 spec/models/accordion_brick_spec.rb
qbrick-2.6.3 spec/models/accordion_brick_spec.rb
qbrick-2.6.2 spec/models/accordion_brick_spec.rb
qbrick-2.6.1 spec/models/accordion_brick_spec.rb
qbrick-2.6.0 spec/models/accordion_brick_spec.rb
qbrick-2.5.2 spec/models/accordion_brick_spec.rb
qbrick-2.5.1 spec/models/accordion_brick_spec.rb
qbrick-2.5.0 spec/models/accordion_brick_spec.rb