summaryrefslogtreecommitdiff
path: root/spec/helpers/users_helper_spec.rb
blob: 03f78de8e912f4289c4cd31b249f9627e70244a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'rails_helper'

describe UsersHelper do
  let(:user) { create(:user) }

  describe '#user_link' do
    subject { helper.user_link(user) }

    it "links to the user's profile" do
      is_expected.to include("href=\"#{user_path(user)}\"")
    end

    it "has the user's email as title" do
      is_expected.to include("title=\"#{user.email}\"")
    end
  end
end