Skip to content

Commit

Permalink
Spec for url_for_record for Automation Manager Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Apr 4, 2017
1 parent aa480b8 commit c9bdea8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@
expect(subject).to eq(helper.url_for_db(helper.controller_for_vm(helper.model_for_vm(@record)), @action))
end

it "when record is ManageIQ::Providers::AutomationManager" do
@record = ManageIQ::Providers::AutomationManager.new
expect(subject).to eq("/automation_manager/#{@action}")
end

it "when record is not VmOrTemplate" do
@record = FactoryGirl.create(:host)
expect(subject).to eq(helper.url_for_db(@record.class.base_class.to_s, @action))
Expand Down

0 comments on commit c9bdea8

Please sign in to comment.