<commit_before>require 'rails_helper'

describe 'creating users', type: :feature do
  before :each do
    when_current_user_is :staff, integration: true
    visit new_user_path
  end

  # staff attribute is a hidden field in the form,
  # so no need to fill it in
  let(:user_fields) { attributes_for(:user).except :staff }

  context 'with required form elements filled in' do
    before :each do
      within 'form.new_user' do
        fill_in_fields_for User, attributes: user_fields
      end
    end
    it 'renders the staff dashboard' do<commit_msg>Evaluate user attributes once<commit_after>require 'rails_helper'

describe 'creating users', type: :feature do
  before :each do
    when_current_user_is :staff, integration: true
    visit new_user_path
  end

  # staff attribute is a hidden field in the form,
  # so no need to fill it in
  let!(:user_fields) { attributes_for(:user).except :staff }

  context 'with required form elements filled in' do
    before :each do
      within 'form.new_user' do
        fill_in_fields_for User, attributes: user_fields
      end
    end
    it 'renders the staff dashboard' do
{'fraction_non_alphanumeric': 0.06643046944198405, 'fraction_numerical': 0.0, 'mean_word_length': 3.52, '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': '2873943', 'n_tokens_mistral': 342, 'n_tokens_neox': 330, 'n_words': 128}