Skip to content

Instantly share code, notes, and snippets.

@alanmaciel
Created February 26, 2018 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanmaciel/297a68a67842e0b99c7e5047d0640e39 to your computer and use it in GitHub Desktop.
Save alanmaciel/297a68a67842e0b99c7e5047d0640e39 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "Deleting a movie" do
it "destroys the movie and shows the movie listing without the deleted movie" do
movie = Movie.create(movie_attributes)
visit movie_path(movie)
click_link 'Delete'
expect(current_path).to eq(movies_path)
expect(page).not_to have_text(movie.title)
expect(page).to have_text('Movie successfully deleted!')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment