Skip to content

Commit

Permalink
Refs #26: Add paper link
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Brand committed Nov 3, 2017
1 parent 3e6cdb4 commit 241b5ec
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions spec/features/paper/index_paper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@

expect(page).to have_link('Edit')
end
#
# it 'should have a link to destroy paper' do
# FactoryGirl.create :paper
# visit papers_path
#
# expect(page).to have_link('Destroy')
# end
#
# it 'should actually remove the paper' do
# FactoryGirl.create :paper
# visit papers_path
#
# expect(paper.find_by_first_name('Alan')).not_to be_nil
#
# click_link('Destroy')
#
# expect(paper.find_by_first_name('Alan')).to be_nil
# end

it 'should have a link to destroy paper' do
FactoryGirl.create :paper
visit papers_path

expect(page).to have_link('Destroy')
end

it 'should actually remove the paper' do
FactoryGirl.create :paper
visit papers_path

expect(paper.find_by_title('COMPUTING MACHINERY AND INTELLIGENCE')).not_to be_nil

click_link('Destroy')

expect(paper.find_by_title('COMPUTING MACHINERY AND INTELLIGENCE')).to be_nil
end
end

0 comments on commit 241b5ec

Please sign in to comment.