Skip to content

Instantly share code, notes, and snippets.

@alanmaciel
Created February 26, 2018 04:16
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/b66af6161347c7002abe591de7fb07b9 to your computer and use it in GitHub Desktop.
Save alanmaciel/b66af6161347c7002abe591de7fb07b9 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "Navigating movies" do
it "allows navigation from the detail page to the listing page" do
movie = Movie.create(movie_attributes)
visit movie_url(movie)
click_link "All Movies"
expect(current_path).to eq(movies_path)
end
it "allows navigation from the listing page to the detail page" do
movie = Movie.create(movie_attributes)
visit movies_url
click_link movie.title
expect(current_path).to eq(movie_path(movie))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment