require "rails_helper" RSpec.describe "Home" do it "shows the vehicle index" do user = create(:user) access_key = AccessKey.current visit root_path fill_in "User name", with: user.name fill_in "Email", with: user.email fill_in "Access key", with: access_key.raw_key click_on "Identify" expect(page).to have_content("Vehicles") expect(page).to have_link("New vehicle") end end