require "rails_helper"

describe "navigating between different sites" do
  it "clicks Users on footer to go to users index page" do
    user = User.create(user_attributes)

    sign_in(user)

    visit events_path
    
    click_link("Users", :match => :first)

    expect(current_path).to eq(users_path)
  end

  it "clicks Events on footer to go to events index page" do
    user = User.create(user_attributes)

    sign_in(user)

    visit users_path

    click_link("Events", :match => :first)

    expect(current_path).to eq(events_path)
  end
end
