require 'spec_helper'

describe "the link in the logo of the header" do
  it "should redirect to the root path if not logged in" do
    visit root_path
    click_link 'root_link'
    current_path.should eq root_path
  end

  it "should redirect to the dashboard if he user is logged in" do
    user = create :user
    login_as_user user
    visit root_path
    click_link 'root_link'
    current_path.should eq home_path
  end
end
