spec/features/blocks/create_spec.rb in flms-0.0.3 vs spec/features/blocks/create_spec.rb in flms-0.1.0

- old
+ new

@@ -3,16 +3,19 @@ feature 'Blocks > Create' do include NamedFactories scenario 'creating a new block' do capybara_sign_in user_1 - visit "/flms/pages/#{page_1.url}/blocks" + visit "/flms/blocks" click_link 'New Block' - fill_in 'Name', with: 'my 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(page_1.reload).to have(1).blocks - block = page_1.blocks.first - expect(block.name).to eql 'my new block' + 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