Project

General

Profile

Revision a373b4f6

Added by Swapnil Abnave over 5 years ago

Fixes #17729 - APIdoc - URL desc add 'Docker' to CR types

View differences:

app/models/foreman_docker/compute_resource_extensions.rb
1
module ForemanDocker
2
  module ComputeResourceExtensions
3
    extend ActiveSupport::Concern
4

  
5
    included do
6
      def self.providers_requiring_url
7
        _("Docker, Libvirt, oVirt, OpenStack and Rackspace")
8
      end
9
    end
10
  end
11
end
lib/foreman_docker/engine.rb
146 146
      # Compatibility fixes - to be removed once 1.7 compatibility is no longer required
147 147
      Fog::Compute::Fogdocker::Images.send(:include, ::FogExtensions::Fogdocker::Images)
148 148
      ::Taxonomy.send(:include, ForemanDocker::TaxonomyExtensions)
149
      ComputeResource.send(:include, ForemanDocker::ComputeResourceExtensions)
149 150
    end
150 151
  end
151 152
end
test/units/foreman_docker/compute_resource_extensions_test.rb
1
require 'test_plugin_helper'
2

  
3
module ForemanDocker
4
  class ComputeResourceExtensionsTest < ActiveSupport::TestCase
5
    test 'ComputeResource::providers_requiring_url returns expected providers' do
6
      expected_providers = "Docker, Libvirt, oVirt, OpenStack and Rackspace"
7
      assert_equal expected_providers, ComputeResource.providers_requiring_url
8
    end
9
  end
10
end

Also available in: Unified diff