<commit_before>require 'test_helper'

describe EventsController do
  let(:convention) { FactoryBot.create(:convention) }
  let(:event) { FactoryBot.create(:event, convention: convention) }

  setup do
    set_convention convention
  end

  test 'should get index' do
    get :index
    assert_response :success
  end

  it 'should not let you view the index page in run order unless you can see the schedule' do
    convention.update!(show_schedule: 'gms')
    get :index, params: { sort: 'first_scheduled_run' }
    assert_response :redirect
    assert flash[:alert]
  end

  describe 'as a con staffer' do
    let(:staff_con_profile) { FactoryBot.create :user_con_profile, convention: convention, staff: true }
    let(:staff_user) { staff_con_profile.user }

    setup do
      sign_in staff_user<commit_msg>Remove test for removed behavior<commit_after>require 'test_helper'

describe EventsController do
  let(:convention) { FactoryBot.create(:convention) }
  let(:event) { FactoryBot.create(:event, convention: convention) }

  setup do
    set_convention convention
  end

  test 'should get index' do
    get :index
    assert_response :success
  end

  describe 'as a con staffer' do
    let(:staff_con_profile) { FactoryBot.create :user_con_profile, convention: convention, staff: true }
    let(:staff_user) { staff_con_profile.user }

    setup do
      sign_in staff_user
{'fraction_non_alphanumeric': 0.08453757225433527, 'fraction_numerical': 0.0, 'mean_word_length': 4.12962962962963, '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': '3302171', 'n_tokens_mistral': 418, 'n_tokens_neox': 407, 'n_words': 124}