Skip to content

Commit

Permalink
Refs #16: red test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBrendel committed Nov 3, 2017
1 parent ad2f10c commit 50a5992
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/authors/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<td><%= author.homepage %></td>
<td><%= link_to 'Show', author %></td>
<td><%= link_to 'Edit', edit_author_path(author) %></td>
<td><%= link_to 'Destroy', author%></td>
<td><%= link_to 'Destroy', author,
method: :delete,
data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
2 changes: 2 additions & 0 deletions spec/features/author/index_author_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@
visit authors_path

expect(page).to have_link('Destroy')
click_link('Destroy')
expect(Author.find_by_first_name('Alan')).to be_nil
end
end

0 comments on commit 50a5992

Please sign in to comment.