A trigger when a topic is updated, adds a couple of custom field tests

This commit is contained in:
Robin Ward
2015-01-02 15:56:44 -05:00
parent 4c166942ad
commit 6f72f265cb
3 changed files with 10 additions and 5 deletions

View File

@ -111,10 +111,13 @@ describe HasCustomFields do
db_item = CustomFieldsTestItem.find(test_item.id)
db_item.custom_fields.should == {"a" => ["b", "c", "d"]}
db_item.custom_fields["a"] = ["c", "d"]
db_item.custom_fields.update('a' => ['c', 'd'])
db_item.save
db_item.custom_fields.should == {"a" => ["c", "d"]}
db_item.custom_fields.delete('a')
db_item.custom_fields.should == {}
end
it "casts integers in arrays properly without error" do