Sha256: b842ddb57446e9ff951a28cfb8aa8f9b8b3e18763b52ebbbb4e761fd12757cc2

Contents?: true

Size: 691 Bytes

Versions: 21

Compression:

Stored size: 691 Bytes

Contents

require 'test_plugin_helper'

class FactHelpersTest < ActiveSupport::TestCase
  class FactsHelpersTestStub
    include ForemanInventoryUpload::Generators::FactHelpers
  end

  setup do
    @instance = FactsHelpersTestStub.new

    @org = FactoryBot.create(:organization)
  end

  test 'golden_ticket uses golden_ticket method when defined' do
    @org.expects(:golden_ticket?).returns(true)

    actual = @instance.golden_ticket?(@org)

    assert actual
  end

  test 'golden_ticket uses content_access_mode method when golden_ticket not defined' do
    @org.expects(:content_access_mode).returns('org_environment')

    actual = @instance.golden_ticket?(@org)

    assert actual
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.12 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.12 test/unit/fact_helpers_test.rb
foreman_rh_cloud-2.0.12 test/unit/fact_helpers_test.rb
foreman_rh_cloud-0.9.11 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.11 test/unit/fact_helpers_test.rb
foreman_rh_cloud-2.0.11 test/unit/fact_helpers_test.rb
foreman_rh_cloud-0.9.10 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.10 test/unit/fact_helpers_test.rb
foreman_rh_cloud-2.0.10 test/unit/fact_helpers_test.rb
foreman_rh_cloud-2.0.9 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.9 test/unit/fact_helpers_test.rb
foreman_rh_cloud-0.9.9 test/unit/fact_helpers_test.rb
foreman_rh_cloud-0.9.8 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.8 test/unit/fact_helpers_test.rb
foreman_rh_cloud-2.0.8 test/unit/fact_helpers_test.rb
foreman_rh_cloud-0.9.7 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.7 test/unit/fact_helpers_test.rb
foreman_rh_cloud-2.0.7 test/unit/fact_helpers_test.rb
foreman_rh_cloud-0.9.6 test/unit/fact_helpers_test.rb
foreman_rh_cloud-1.0.6 test/unit/fact_helpers_test.rb