<commit_before>require File.dirname(__FILE__) + '/../spec_helper'

describe TrackController, "when making a new track on a request" do
    integrate_views
    fixtures :info_requests, :outgoing_messages, :incoming_messages, :info_request_events, :users
  
    it "should render with 'track_set' template" do
        get :track_request, :url_title => info_requests(:fancy_dog_request).url_title
        response.should render_template('track_set')
    end

    it "should assign the title" do
        get :track_request, :url_title => info_requests(:fancy_dog_request).url_title

        assigns[:title].should include("Track the request")
    end

    it "should require login when making new track" do
        post :track_request, :url_title => info_requests(:fancy_dog_request).url_title,
            :track_thing => { :track_medium => "email_daily" }, 
            :submitted_track => 1
        post_redirect = PostRedirect.get_last_post_redirect
        response.should redirect_to(:controller => 'user', :action => 'signin', :token => post_redirect.token)<commit_msg>Spec change<commit_after>require File.dirname(__FILE__) + '/../spec_helper'

describe TrackController, "when making a new track on a request" do
    integrate_views
    fixtures :info_requests, :outgoing_messages, :incoming_messages, :info_request_events, :users
  
    it "should render with 'track_set' template" do
        get :track_request, :url_title => info_requests(:fancy_dog_request).url_title
        response.should render_template('track_set')
    end

    it "should assign the title" do
        get :track_request, :url_title => info_requests(:fancy_dog_request).url_title

        assigns[:title].should include("track the request")
    end

    it "should require login when making new track" do
        post :track_request, :url_title => info_requests(:fancy_dog_request).url_title,
            :track_thing => { :track_medium => "email_daily" }, 
            :submitted_track => 1
        post_redirect = PostRedirect.get_last_post_redirect
        response.should redirect_to(:controller => 'user', :action => 'signin', :token => post_redirect.token)
{'fraction_non_alphanumeric': 0.10177404295051354, 'fraction_numerical': 0.0009337068160597573, 'mean_word_length': 3.8926940639269407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '3421264', 'n_tokens_mistral': 622, 'n_tokens_neox': 608, 'n_words': 154}