<commit_before>require 'test_helper'

class ActivitiesControllerTest < ActionController::TestCase
  test "creating an activity" do
    assert_difference('Activity.count') do
      post :create, activity: {name: "Surfing"}
    end

    assert assigns(:activity)
  end

  test "creating an activity without name must fail" do
    assert_raises ActionController::ParameterMissing do
      post :create, activity: {}
    end
  end

  test "obtaining a list of activities" do
    get :index, date_start: Date.parse("2014-01-01"), date_end: Date.parse("2014-01-31")
    assert assigns(:activities)
  end
end<commit_msg>Add test to show we can get schedules for a single day<commit_after>require 'test_helper'

class ActivitiesControllerTest < ActionController::TestCase
  test "creating an activity" do
    assert_difference('Activity.count') do
      post :create, activity: {name: "Surfing"}
    end

    assert assigns(:activity)
  end

  test "creating an activity without name must fail" do
    assert_raises ActionController::ParameterMissing do
      post :create, activity: {}
    end
  end

  test "obtaining a list of activities" do
    get :index, date_start: Date.parse("2014-01-01"), date_end: Date.parse("2014-01-31")
    assert assigns(:activities)
  end

  test "obtaining a list of activities in a day should be fine" do
    date = Date.parse("2014-01-01")
    get :index, date_start: date, date_end: date
    assert assigns(:activities)
  end
end
{'fraction_non_alphanumeric': 0.09327846364883402, 'fraction_numerical': 0.027434842249657063, 'mean_word_length': 3.9457627118644067, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2265856', 'n_tokens_mistral': 467, 'n_tokens_neox': 419, 'n_words': 144}