Project

General

Profile

« Previous | Next » 

Revision 91b4e718

Added by Shimon Shtein about 8 years ago

Fixes #13849 - Now the facets will not require id attribute for update

(cherry picked from commit ec76b0092f9af5b8f7e2e02777f376b6b6e0d711)

View differences:

test/unit/facet_test.rb
assert_not_nil attributes["test_facet_attributes"]
end
test 'facets are updated without specifying id explicitly' do
saved_host = FactoryGirl.create(:host)
saved_host.build_test_facet
saved_host.save!
TestFacet.class_eval do
def my_attribute
end
def my_attribute=(val)
end
attr_accessible :my_attribute
end
saved_host.attributes = {'test_facet_attributes' => { 'my_attribute' => 'my_value'}}
assert_not_nil saved_host.test_facet.id
end
end
end

Also available in: Unified diff