mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
FEATURE: serialize and update category custom_fields
- send to client - update from client
This commit is contained in:
@ -162,8 +162,12 @@ describe CategoriesController do
|
||||
permissions: {
|
||||
"everyone" => readonly,
|
||||
"staff" => create_post
|
||||
},
|
||||
custom_fields: {
|
||||
"dancing" => "frogs"
|
||||
}
|
||||
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
@category.reload
|
||||
expect(@category.category_groups.map{|g| [g.group_id, g.permission_type]}.sort).to eq([
|
||||
@ -173,6 +177,7 @@ describe CategoriesController do
|
||||
expect(@category.slug).to eq("hello-category")
|
||||
expect(@category.color).to eq("ff0")
|
||||
expect(@category.auto_close_hours).to eq(72)
|
||||
expect(@category.custom_fields).to eq({"dancing" => "frogs"})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user