mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: serialize and update category custom_fields
- send to client - update from client
This commit is contained in:
parent
79027c2775
commit
e3fa27a01c
4 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue