<commit_before>require 'rails_helper'

RSpec.feature 'User list shows emails', type: :feature do

  include Warden::Test::Helpers
  Warden.test_mode!

  let(:admin) { create :admin_user }
  let!(:emails) do
    (1..5).each { create :user, office: create(:office) }
    User.pluck(:email) - [admin.email]
  end

  context 'as an admin' do
    before(:each) do
      login_as admin
      visit '/users'
    end

    scenario 'email address heading' do
      expect(page).to have_content 'Email'
    end

    scenario 'there are links to email addresses' do
      emails.each do |email|
        expect(page).to have_xpath("//a[contains(@href,email)]")
      end
    end
  end
end<commit_msg>Check for emails explicitly<commit_after>require 'rails_helper'

RSpec.feature 'User list shows emails', type: :feature do

  include Warden::Test::Helpers
  Warden.test_mode!

  let(:admin) { create :admin_user }
  let!(:emails) do
    (1..5).each { create :user, office: create(:office) }
    User.pluck(:email) - [admin.email]
  end

  context 'as an admin' do
    before(:each) do
      login_as admin
      visit '/users'
    end

    scenario 'email address heading' do
      expect(page).to have_content 'Email'
    end

    scenario 'there are links to email addresses' do
      emails.each do |email|
        expect(page).to have_content email
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11257309941520467, 'fraction_numerical': 0.0029239766081871343, 'mean_word_length': 2.9452449567723344, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4218992', 'n_tokens_mistral': 445, 'n_tokens_neox': 438, 'n_words': 131}