Sha256: 62bba1c274333bffd2c0ca43edd2f04851d12488b8a3a1d13888b82b2e2383b2

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

require 'spec_helper'

feature 'ImageLayers > Create' do
  include NamedFactories

  scenario 'creating a new image layer' do
    capybara_sign_in user_1
    visit "/flms/pages/#{page_1.url}/blocks/#{block_1a.id}"
    click_link 'Add Image Layer'
    fill_in 'Name', with: 'my new layer'
    click_button 'Create Image layer'

    # Expect to be back at the block page.
    expect(current_path).to eql "/flms/pages/#{page_1.url}/blocks/#{block_1a.id}"

    # Expect that the layer is created.
    expect(Flms::Layer).to have(1).instances
    expect(block_1a.reload).to have(1).layers
    layer = block_1a.layers.first
    expect(layer.class).to eql Flms::ImageLayer
    expect(layer.name).to eql 'my new layer'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flms-0.0.3 spec/features/layers/image_layers/create_spec.rb