Project

General

Profile

« Previous | Next » 

Revision 630061d2

Added by Michael Moll almost 6 years ago

Fixes #19775 - Fix Layout/ExtraSpacing cop

View differences:

test/controllers/hostgroups_controller_test.rb
end
test 'should not escape lookup values on environment change' do
hostgroup = FactoryBot.create(:hostgroup, :environment => @environment, :puppetclass_ids => [@puppetclass.id])
hostgroup = FactoryBot.create(:hostgroup, :environment => @environment, :puppetclass_ids => [@puppetclass.id])
lookup_key = FactoryBot.create(:puppetclass_lookup_key, :as_smart_class_param, :key_type => 'array',
:default_value => ['a', 'b'], :override => true, :puppetclass => @puppetclass)
lookup_value = FactoryBot.create(:lookup_value, :lookup_key => lookup_key, :match => "hostgroup=#{hostgroup.name}", :value => ["c", "d"])
......
FactoryBot.create(:environment_class, :puppetclass => @puppetclass, :environment => @environment, :puppetclass_lookup_key => lookup_key)
# sending exactly what the host form would send which is lookup_value.value_before_type_cast
lk = {"lookup_values_attributes" => {lookup_key.id.to_s => {"value" => lookup_value.value_before_type_cast, "id" =>lookup_value.id, "lookup_key_id" => lookup_key.id, "_destroy" => false}}}
lk = {"lookup_values_attributes" => {lookup_key.id.to_s => {"value" => lookup_value.value_before_type_cast, "id" =>lookup_value.id, "lookup_key_id" => lookup_key.id, "_destroy" => false}}}
params = {
hostgroup_id: hostgroup.id,

Also available in: Unified diff