Skip to content

Commit

Permalink
Refs #32: red test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBrendel committed Nov 4, 2017
1 parent 638ff29 commit eb0376c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/features/paper/index_paper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@
click_link('Destroy')
expect(Paper.find_by_title('COMPUTING MACHINERY AND INTELLIGENCE')).to be_nil
end

it 'should be able to filter papers by year' do
FactoryGirl.create :paper
paper2 = Paper.new(title: 'go to statement considered harmful',
venue: 'communications of the acm',
year: 1968)
paper2.save
visit (papers_path + '?year=1950')

expect(page.text).to match(/COMPUTING MACHINERY AND INTELLIGENCE/i)
expect(page.text).not_to match(/go to statement considered harmful/i)
end
end

0 comments on commit eb0376c

Please sign in to comment.