Skip to content

Commit

Permalink
Merge pull request #389 from agrare/make_catalog_types_pluggable
Browse files Browse the repository at this point in the history
Make Provider Catalog Types Pluggable
  • Loading branch information
Fryguy authored Apr 9, 2020
2 parents e65be4f + 2278740 commit 116fc4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/models/manageiq/providers/azure/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def description
ManageIQ::Providers::Azure::Regions.find_by_name(provider_region)[:description]
end

def supported_catalog_types
%w(azure)
def self.catalog_types
{"azure" => N_("Azure")}
end

def allow_targeted_refresh?
Expand Down
6 changes: 3 additions & 3 deletions spec/models/manageiq/providers/azure/cloud_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ def create_factory_ems(name, region)
end
end

context 'catalog types' do
describe "#catalog types" do
let(:ems) { FactoryBot.create(:ems_azure) }

it "#supported_catalog_types" do
expect(ems.supported_catalog_types).to eq(%w(azure))
it "#catalog_types" do
expect(ems.catalog_types).to include("azure")
end
end
end

0 comments on commit 116fc4b

Please sign in to comment.