From ebbb4498665ea1f4d8e34e535f9808cb38d86351 Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 9 Nov 2017 19:01:47 +0100 Subject: [PATCH] failed test for #24 --- app/views/papers/index.html.erb | 2 +- spec/features/paper/index_paper_spec.rb | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index 997e75c..77689a9 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -1,6 +1,6 @@

Papers

-<%= link_to 'Add author', new_author_path %> + diff --git a/spec/features/paper/index_paper_spec.rb b/spec/features/paper/index_paper_spec.rb index 49af3ac..0d6b57e 100644 --- a/spec/features/paper/index_paper_spec.rb +++ b/spec/features/paper/index_paper_spec.rb @@ -16,6 +16,24 @@ expect(page).to have_content(@paper.year) end +it "Link to the paper creation page" do + visit papers_path + expect(page).to have_css('a', :text => /[aA]dd paper/i) + end + it "Link to the paper details pages" do + visit papers_path + expect(page).to have_css('a', :text => /[sS]how/i) + end + it "Link to the paper edit page" do + visit papers_path + expect(page).to have_css('a', :text => /[eE]dit/i) + end + + it "paper entries should have delete button" do + visit papers_path + expect(page).to have_css('a', :text => /[dD]estroy/i) + end + end \ No newline at end of file