mirror of
https://github.com/discourse/discourse.git
synced 2025-09-10 08:17:55 +08:00
A trigger when a topic is updated, adds a couple of custom field tests
This commit is contained in:
parent
4c166942ad
commit
6f72f265cb
3 changed files with 10 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue