Revision cabe2c2e
Added by Ohad Levy about 7 years ago
test/controllers/puppetclasses_controller_test.rb | ||
---|---|---|
# below is the same test as above, except environment is changed from production to global_puppetmaster, so custom_class_param is NOT added
|
||
host = FactoryGirl.create(:host, :environment => environments(:production))
|
||
existing_host_attributes = host_attributes(host)
|
||
existing_host_attributes.merge!('environment_id' => environments(:global_puppetmaster).id)
|
||
existing_host_attributes['environment_id'] = environments(:global_puppetmaster).id
|
||
puppetclass = puppetclasses(:two)
|
||
post :parameters, {:id => puppetclass.id, :host_id => host.id,
|
||
:host => existing_host_attributes }, set_session_user
|
Also available in: Unified diff
Fixes #19700 - update rubocop rules
The following changes have been made:
- Performance/RedundantMerge:
changes lines such as:
```not_found_message.merge! :message => options```
to:
```not_found_message[:message] = options```
- converts str.match() to str =~ ()
- remove extra whitespaces etc.