FEATURE: serialize and update category custom_fields

- send to client
- update from client
This commit is contained in:
Sam Saffron
2015-06-10 06:07:37 +10:00
parent 79027c2775
commit e3fa27a01c
4 changed files with 10 additions and 2 deletions

View File

@ -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