Skip to content

Commit

Permalink
Specs for ensure_managers moved to before_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Jun 23, 2017
1 parent 13b7149 commit fff521d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/models/manageiq/providers/foreman/provider_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,16 @@
expect(CustomizationScript.count).to eq(0)
end
end

describe "#save" do
it "will update the name for the manager" do
provider = FactoryGirl.create(:provider_foreman, :zone => FactoryGirl.create(:zone), :name => 'Old Name')
expect(provider.configuration_manager.name).to eq('Old Name Configuration Manager')

provider.name = 'New Name'
provider.save
expect(provider.configuration_manager.name).to eq('New Name Configuration Manager')
expect(provider.provisioning_manager.name).to eq('New Name Provisioning Manager')
end
end
end

0 comments on commit fff521d

Please sign in to comment.