19 lines
420 B
Ruby
19 lines
420 B
Ruby
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
|