<commit_before>include QuadiconHelper

describe "layouts/listnav/_ems_cloud.html.haml" do
  before :each do
    set_controller_for_view("ems_cloud")
    assign(:panels, "ems_cloud_prop" => true, "ems_cloud_rel" => true)
    @settings = {:quadicons => {:ems => true}}
    allow(view).to receive(:truncate_length).and_return(23)
    allow(view).to receive(:role_allows).and_return(true)
  end

  it "Flavors link for Openstack cloud manager uses restful path" do
    record = FactoryGirl.create(:ems_openstack)
    assign(:record, record)
    allow(record).to receive(:flavors).and_return(5)
    render
    expect(response).to include "ems_cloud/#{record.compressed_id}?display=flavors"
  end

  it "Flavors link for Amazon cloud manager uses restful paths" do
    record = ManageIQ::Providers::Amazon::CloudManager.new(:name => "Test Cloud")
    assign(:record, record)
    allow(record).to receive(:flavors).and_return(14)
    render
    expect(response).to include "ems_cloud?display=flavors"
  end
  it "Availability Zones link uses restful paths" do
    record = FactoryGirl.create(:ems_openstack)
    assign(:record, record)
    allow(record).to receive(:availability_zones).and_return(14)
    render
    expect(response).to include "ems_cloud/#{record.compressed_id}?display=availability_zones"
  end
  it "Cloud Tenants link uses restful paths" do
    record = ManageIQ::Providers::Amazon::CloudManager.new(:name => "Test Cloud")
    assign(:record, record)
    allow(record).to receive(:cloud_tenants).and_return(10)
    render
    expect(response).to include "ems_cloud?display=cloud_tenants"
  end
end<commit_msg>Check for id instead of compressed_id<commit_after>include QuadiconHelper

describe "layouts/listnav/_ems_cloud.html.haml" do
  before :each do
    set_controller_for_view("ems_cloud")
    assign(:panels, "ems_cloud_prop" => true, "ems_cloud_rel" => true)
    @settings = {:quadicons => {:ems => true}}
    allow(view).to receive(:truncate_length).and_return(23)
    allow(view).to receive(:role_allows).and_return(true)
  end

  it "Flavors link for Openstack cloud manager uses restful path" do
    record = FactoryGirl.create(:ems_openstack)
    assign(:record, record)
    allow(record).to receive(:flavors).and_return(5)
    render
    expect(response).to include "ems_cloud/#{record.id}?display=flavors"
  end

  it "Flavors link for Amazon cloud manager uses restful paths" do
    record = ManageIQ::Providers::Amazon::CloudManager.new(:name => "Test Cloud")
    assign(:record, record)
    allow(record).to receive(:flavors).and_return(14)
    render
    expect(response).to include "ems_cloud?display=flavors"
  end
  it "Availability Zones link uses restful paths" do
    record = FactoryGirl.create(:ems_openstack)
    assign(:record, record)
    allow(record).to receive(:availability_zones).and_return(14)
    render
    expect(response).to include "ems_cloud/#{record.id}?display=availability_zones"
  end
  it "Cloud Tenants link uses restful paths" do
    record = ManageIQ::Providers::Amazon::CloudManager.new(:name => "Test Cloud")
    assign(:record, record)
    allow(record).to receive(:cloud_tenants).and_return(10)
    render
    expect(response).to include "ems_cloud?display=cloud_tenants"
  end
end
{'fraction_non_alphanumeric': 0.12014787430683918, 'fraction_numerical': 0.005545286506469501, 'mean_word_length': 4.925182481751825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6033467', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1013, 'n_words': 224}