mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:01:18 +08:00
A trigger when a topic is updated, adds a couple of custom field tests
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user