Skip to content

Commit

Permalink
Refs #23: red test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBrendel committed Nov 3, 2017
1 parent a55d48c commit 48c9e89
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/features/paper/new_paper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,15 @@
expect(page).to have_field('Venue')
expect(page).to have_field('Year')
end

it 'should save the entered values to the database' do
visit new_paper_path

fill_in 'paper_title', with: 'COMPUTING MACHINERY AND INTELLIGENCE'
fill_in 'paper_venue', with: 'Mind 49: 433-460'
fill_in 'paper_year', with: 1950
expect(Paper.find_by_title('COMPUTING MACHINERY AND INTELLIGENCE')).to be_nil
find('input[type="submit"]').click
expect(Paper.find_by_title('COMPUTING MACHINERY AND INTELLIGENCE')).not_to be_nil
end
end

0 comments on commit 48c9e89

Please sign in to comment.