Browse Source

slug param in user_workspace

Guénaël Muller 6 years ago
parent
commit
4eff11bfc3
2 changed files with 2 additions and 1 deletions
  1. 1 0
      tracim/tests/functional/test_user.py
  2. 1 1
      tracim/views/core_api/schemas.py

+ 1 - 0
tracim/tests/functional/test_user.py View File

@@ -30,6 +30,7 @@ class TestUserWorkspaceEndpoint(FunctionalTest):
30 30
         workspace = res[0]
31 31
         assert workspace['id'] == 1
32 32
         assert workspace['label'] == 'Business'
33
+        assert workspace['slug'] == 'business'
33 34
         assert len(workspace['sidebar_entries']) == 7
34 35
 
35 36
         sidebar_entry = workspace['sidebar_entries'][0]

+ 1 - 1
tracim/views/core_api/schemas.py View File

@@ -188,6 +188,7 @@ class WorkspaceMenuEntrySchema(marshmallow.Schema):
188 188
 
189 189
 class WorkspaceDigestSchema(marshmallow.Schema):
190 190
     id = marshmallow.fields.Int(example=4)
191
+    slug = marshmallow.fields.String(example='intranet')
191 192
     label = marshmallow.fields.String(example='Intranet')
192 193
     sidebar_entries = marshmallow.fields.Nested(
193 194
         WorkspaceMenuEntrySchema,
@@ -199,7 +200,6 @@ class WorkspaceDigestSchema(marshmallow.Schema):
199 200
 
200 201
 
201 202
 class WorkspaceSchema(WorkspaceDigestSchema):
202
-    slug = marshmallow.fields.String(example='intranet')
203 203
     description = marshmallow.fields.String(example='All intranet data.')
204 204
 
205 205
     class Meta: