<commit_before>require 'test_helper'

class PeopleController < ActionController::Base
  def create
    params.required[:person]
    head :ok
  end
end

class ActionControllerTaintedParamsTest < ActionController::TestCase
  tests PeopleController
  
  test "missing required parameters will raise exception" do
    post :create, { user: { name: "Mjallo!" } }
    assert_response :bad_request
  end
  
  test "required parameters that are present will not raise" do
    post :create, { person: { name: "Mjallo!" } }
    assert_response :ok
  end
end<commit_msg>Make all tests green.<commit_after>require 'test_helper'

class BooksController < ActionController::Base
  def create
    params.required[:book]
    head :ok
  end
end

class ActionControllerRequiredParamsTest < ActionController::TestCase
  tests BooksController
  
  test "missing required parameters will raise exception" do
    post :create, { magazine: { name: "Mjallo!" } }
    assert_response :bad_request
  end
  
  test "required parameters that are present will not raise" do
    post :create, { book: { name: "Mjallo!" } }
    assert_response :ok
  end
end
{'fraction_non_alphanumeric': 0.0791111111111111, 'fraction_numerical': 0.0, 'mean_word_length': 4.095022624434389, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1683023', 'n_tokens_mistral': 317, 'n_tokens_neox': 316, 'n_words': 106}