<commit_before>require 'test_helper'

class CallsControllerTest < ActionController::TestCase
  include Devise::TestHelpers

  def setup
    @user = build :user
    puts @user
    sign_in @user
    @case = create :case
    @call = build :call
    puts @case
  end

  describe 'create method' do
    before do
      @call = attributes_for :call
    end

    it 'should create and save a new call' do
      assert_difference 'Case.find(@case).calls.count', 1 do
        post :create, call: @call, id: @case
      end
      assert_response :redirect
    end

    it 'should associate the new call with a case' do
    end

    it 'should redirect to the root path afterwards' do
    end

    it 'should not save if status is blank for some reason' do
    end

    it 'should reject other attributes besides status' do
    end

  end

end<commit_msg>test calls#create should redirect to the root path<commit_after>require 'test_helper'

class CallsControllerTest < ActionController::TestCase
  include Devise::TestHelpers

  def setup
    @user = build :user
    puts @user
    sign_in @user
    @case = create :case
    @call = build :call
    puts @case
  end

  describe 'create method' do
    before do
      @call = attributes_for :call
    end

    it 'should create and save a new call' do
      assert_difference 'Case.find(@case).calls.count', 1 do
        post :create, call: @call, id: @case
      end
      assert_response :redirect
    end

    it 'should associate the new call with a case' do
    end

    it 'should redirect to the root path afterwards' do
      post :create, call: @call, id: @case
      assert_redirected_to root_path
    end

    it 'should not save if status is blank for some reason' do
    end

    it 'should reject other attributes besides status' do
    end

  end

end
{'fraction_non_alphanumeric': 0.06426592797783934, 'fraction_numerical': 0.00110803324099723, 'mean_word_length': 2.6411290322580645, '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': '1447293', 'n_tokens_mistral': 534, 'n_tokens_neox': 521, 'n_words': 220}