Sha256: 16ed27b7e2a7ea8e034be6fc6783db44a9d1c1325d23d20be0dcd0992074d498

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

require 'spec_helper'

feature 'Blocks > Create' do
  include NamedFactories

  scenario 'creating a new block' do
    capybara_sign_in user_1
    visit "/flms/blocks"
    click_link 'New Block'
    fill_in 'Name', with: 'my-new-block'
    fill_in 'Title', with: 'Block Title'
    attach_file 'Thumbnail', 'spec/placeholder.png'

    click_button 'Create Block'

    expect(Flms::Block).to have(1).instances
    expect(Flms::Block.first.name).to eql 'my-new-block'
    expect(Flms::Block.first.title).to eql 'Block Title'
    expect(Flms::Block.first.thumbnail).not_to be nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 spec/features/blocks/create_spec.rb
flms-0.1.0 spec/features/blocks/create_spec.rb