Sha256: 67c03e35a0b15fb398f6308c7173e9efd1bb41f6797d909399ebd8676d374042

Contents?: true

Size: 483 Bytes

Versions: 38

Compression:

Stored size: 483 Bytes

Contents

require 'test_puppet_helper'

module ForemanPuppet
  class HostCounterTest < ActiveSupport::TestCase
    def hosts_count(association)
      ::HostCounter.new(association)
    end

    let(:environment) { FactoryBot.create(:environment) }

    test 'it should get number of hosts associated to environment' do
      FactoryBot.create(:host, :with_puppet_enc, environment: environment)
      count = hosts_count(:environment)
      assert_equal 1, count[environment]
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
foreman_puppet-8.0.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.4.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-7.0.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.3.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.2.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.1.1 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-5.1.3 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.1.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.0.1 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-6.0.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-5.1.2 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.1.1 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-5.1.1 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-5.1.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.1.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.0.4 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-5.0.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.0.3 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.0.2 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.7 test/services/foreman_puppet/host_counter_test.rb