<commit_before>require 'spec_helper'

describe BusinessSupportController do

  describe "GET search" do
    it "should set expiry headers" do
      get :search, :format => :json
      response.headers["Cache-Control"].should == "max-age=1800, public"
    end

    it "should accept json requests" do
      get :search, :format => :json
      response.should be_success
      response.header['Content-Type'].should include 'application/json'
    end

    it "should deny other formats" do
      get :search
      response.status.should == 406
    end
  end
end<commit_msg>Add controller specs<commit_after>require 'spec_helper'

describe BusinessSupportController do

  describe "GET search" do
    it "should set expiry headers" do
      get :search, :format => :json
      response.headers["Cache-Control"].should == "max-age=1800, public"
    end

    it "should accept json requests" do
      get :search, :format => :json
      response.should be_success
      response.header['Content-Type'].should include 'application/json'
    end

    it "should deny other formats" do
      get :search
      response.status.should == 406
    end
  end

  describe "GET show" do
    it "should set expiry headers" do
      get :show, :slug => "foo", :format => :json
      response.headers["Cache-Control"].should == "max-age=1800, public"
    end

    it "should accept json requests" do
      get :show, :slug => "bar", :format => :json
      response.should be_success
      response.header['Content-Type'].should include 'application/json'
    end

    it "should deny other formats" do
      get :show, :slug => "foo"
      response.status.should == 406
    end
  end
end
{'fraction_non_alphanumeric': 0.10665068903535051, 'fraction_numerical': 0.012582384661473937, 'mean_word_length': 2.92018779342723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '1211837', 'n_tokens_mistral': 500, 'n_tokens_neox': 469, 'n_words': 157}