Created
February 26, 2018 04:13
-
-
Save alanmaciel/297a68a67842e0b99c7e5047d0640e39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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