<commit_before>require 'spec_helper'

describe UsersController do

  before do
    request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:linked_in]
    session[:user_id] = 1
  end

  describe "#index" do
    it "should render the index template" do
      get :index
      response.should render_template("users/index")
    end
  end

  describe "#show and #edit" do
    before do
      Factory(:user)
      @users = User.find(:first)
      stub_request(:get, "https://api.linkedin.com/v1/people/id=bSNqC4s_4k:(id,first-name,last-name,headline,location,industry,distance,relation-to-viewer,current-share,connections,num-connections,num-connections-capped,summary,specialties,proposal-comments,associations,honors,interests,positions,publications,patents,languages,skills,certifications,educations,three-current-positions,three-past-positions,num-recommenders,recommendations-received,phone-numbers,im-accounts,twitter-accounts,date-of-birth,main-address,member-url-resources,picture-url,site-standard-profile-request,api-public-profile-request,site-public-profile-request,api-standard-profile-request,public-profile-url)").
          to_return(:status => 200, :body => fixture("linked_in_profile.json"), :headers => {})
    end

    it "should render the show template" do
      get :show, :id => @users
      response.should render_template("users/show")
    end
<commit_msg>Changed stub for less profile fields<commit_after>require 'spec_helper'

describe UsersController do

  before do
    request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:linked_in]
    session[:user_id] = 1
  end

  describe "#index" do
    it "should render the index template" do
      get :index
      response.should render_template("users/index")
    end
  end

  describe "#show and #edit" do
    before do
      Factory(:user)
      @users = User.find(:first)
      stub_request(:get, "https://api.linkedin.com/v1/people/id=bSNqC4s_4k:(id,first-name,last-name,headline,location,summary,specialties,interests,positions,languages,skills,site-standard-profile-request,educations,three-current-positions,three-past-positions,picture-url)").
          to_return(:status => 200, :body => fixture("linked_in_profile.json"), :headers => {})
    end

    it "should render the show template" do
      get :show, :id => @users
      response.should render_template("users/show")
    end

{'fraction_non_alphanumeric': 0.1270578303081469, 'fraction_numerical': 0.0059096665259603205, 'mean_word_length': 4.589622641509434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '7308398', 'n_tokens_mistral': 762, 'n_tokens_neox': 728, 'n_words': 125}