swt2-intro-exercise / rails-exercise-20-Paula-Kli

rails-exercise-20-Paula-Kli created by GitHub Classroom
MIT License
0 stars 0 forks source link

Author index page should link to the new author page #7

Closed swt2public closed 3 years ago

swt2public commented 3 years ago

Scenario

When users visits the authors index page Then it has a link to add a new author

Hints

Feature: an overview page of all saved authors (index action on AuthorsController), new view (app/views/authors/index.html.erb).

Create a separate file (ending in _spec.rb) for feature tests for this page. The overview page should have a (HTML) table with the headings "Name" and "Homepage" listing the full names as well as homepages of authors and should link to individual author's detail pages. The page should also contain a link to add new authors. The have_link method might be helpful to test the existence of links: expect(page).to have_link 'New', href: new_author_path

Here is the relevant section of the guide.

Error

Expected to find link nil with href "/authors/new" but there were no matches

11/44 exercise tests have passed