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-2.0.7 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.0.1 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-4.0.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.6 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.6 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.5 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.5 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.4 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.4 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.3 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.2 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.3 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-3.0.1 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.2 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.0 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-1.0.5 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-1.0.4 test/services/foreman_puppet/host_counter_test.rb
foreman_puppet-2.0.0.alpha.2 test/services/foreman_puppet/host_counter_test.rb