Finished phase005
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe "Home" do
|
||||
it "shows the placeholder landing page" do
|
||||
it "shows the vehicle index" do
|
||||
user = create(:user)
|
||||
access_key = AccessKey.current
|
||||
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_content("Car Tracker")
|
||||
expect(page).to have_content("Vehicle maintenance and fuel tracking will be added here.")
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user