1
0
Fork 0
tack2us/spec/features/creates_new_paste_spec.rb

20 lines
458 B
Ruby

require 'spec_helper'
feature 'Creates new paste' do
scenario 'with valid content' do
visit new_paste_path
fill_in 'Content', with: 'Test'
click_button 'Paste it!'
expect(page).to have_content('Your paste has been added')
end
scenario 'with blank content' do
visit new_paste_path
fill_in 'Content', with: ' '
click_button 'Paste it!'
expect(page).to have_content('There was an error submitting your form')
end
end