<commit_before>require 'rails_helper'

RSpec.describe 'work_days/edit.html.erb', type: :view do
  before(:each) do
    @work_day = assign(:work_day, WorkDay.create!(
      :date => '11-11-2015',
      :start_time => Date.today.beginning_of_day,
      :break => 30,
      :end_time => Date.today.end_of_day,
      :attendance => 'K',
      :notes => 'MyString'
    ))
  end

  it 'renders the work_day form' do
    render

    assert_select 'form[action=?][method=?]', work_day_path(@work_day), 'post' do
        assert_select 'select#work_day_date_1i[name=?]', 'work_day[date(1i)]'
        assert_select 'select#work_day_date_2i[name=?]', 'work_day[date(2i)]'
        assert_select 'select#work_day_date_3i[name=?]', 'work_day[date(3i)]'

        assert_select 'select#work_day_start_time_4i[name=?]', 'work_day[start_time(4i)]'
        assert_select 'select#work_day_start_time_5i[name=?]', 'work_day[start_time(5i)]'

        assert_select 'input#work_day_break[name=?]', 'work_day[break]'

        assert_select 'select#work_day_end_time_4i[name=?]', 'work_day[end_time(4i)]'
        assert_select 'select#work_day_end_time_5i[name=?]', 'work_day[end_time(5i)]'

        assert_select 'select#work_day_attendance[name=?]', 'work_day[attendance]'
        assert_select 'input#work_day_notes[name=?]', 'work_day[notes]'
    end
  end
end
<commit_msg>work_da needs user_id<commit_after>require 'rails_helper'

RSpec.describe 'work_days/edit.html.erb', type: :view do
  before(:each) do
    @work_day = assign(:work_day, WorkDay.create!(
      :date => '11-11-2015',
      :start_time => Date.today.beginning_of_day,
      :break => 30,
      :end_time => Date.today.end_of_day,
      :attendance => 'K',
      :notes => 'MyString',
      :user_id => 1
    ))
  end

  it 'renders the work_day form' do
    render

    assert_select 'form[action=?][method=?]', work_day_path(@work_day), 'post' do
        assert_select 'select#work_day_date_1i[name=?]', 'work_day[date(1i)]'
        assert_select 'select#work_day_date_2i[name=?]', 'work_day[date(2i)]'
        assert_select 'select#work_day_date_3i[name=?]', 'work_day[date(3i)]'

        assert_select 'select#work_day_start_time_4i[name=?]', 'work_day[start_time(4i)]'
        assert_select 'select#work_day_start_time_5i[name=?]', 'work_day[start_time(5i)]'

        assert_select 'input#work_day_break[name=?]', 'work_day[break]'

        assert_select 'select#work_day_end_time_4i[name=?]', 'work_day[end_time(4i)]'
        assert_select 'select#work_day_end_time_5i[name=?]', 'work_day[end_time(5i)]'

        assert_select 'select#work_day_attendance[name=?]', 'work_day[attendance]'
        assert_select 'input#work_day_notes[name=?]', 'work_day[notes]'
    end
  end
end

{'fraction_non_alphanumeric': 0.15488936473947182, 'fraction_numerical': 0.01748750892219843, 'mean_word_length': 3.9786856127886323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '3508960', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1069, 'n_words': 144}