<commit_before>describe ConfigurationJobController do
  include CompressedIds

  let!(:user) { stub_user(:features => :all) }

  before(:each) do
    EvmSpecHelper.create_guid_miq_server_zone
  end

  render_views

  describe '#show' do
    context "instances" do
      let(:record) { FactoryGirl.create(:ansible_tower_job) }

      before do
        session[:settings] = {
        }
        get :show, :params => {:id => record.id}
      end

      it "renders the listnav" do
        expect(response.status).to eq(200)
        expect(response).to render_template(:partial => "layouts/listnav/_configuration_job")
      end
    end<commit_msg>ConfigurationJobController - test that quadicons return the right url (transferred from ManageIQ/manageiq@692866bc6c4ec24f7f44148b354a0028c69cc621)<commit_after>describe ConfigurationJobController do
  include CompressedIds

  let!(:user) { stub_user(:features => :all) }

  before(:each) do
    EvmSpecHelper.create_guid_miq_server_zone
  end

  render_views

  describe '#show' do
    context "instances" do
      let(:record) { FactoryGirl.create(:ansible_tower_job) }

      before do
        session[:settings] = {
        }
        get :show, :params => {:id => record.id}
      end

      it "renders the listnav" do
        expect(response.status).to eq(200)
        expect(response).to render_template(:partial => "layouts/listnav/_configuration_job")
      end

      it "links to ConfigurationJobController" do  # instead of OrchestrationStackController
        extend QuadiconHelper
        extend ApplicationHelper
        allow(self).to receive(:url_for) do |opt|
          opt
        end

        url_for_options = url_for_db(quadicon_model_name(record), "show", record)

        expect(url_for_options[:controller]).to eq("configuration_job")
      end
    end
{'fraction_non_alphanumeric': 0.09610104338275673, 'fraction_numerical': 0.018671059857221308, 'mean_word_length': 3.1693363844393594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6198001', 'n_tokens_mistral': 579, 'n_tokens_neox': 535, 'n_words': 118}