Skip to content

Commit

Permalink
test missing navigation in mgmt api
Browse files Browse the repository at this point in the history
CPCN-432
  • Loading branch information
petrjasek committed Oct 26, 2023
1 parent 34efb4e commit c55efe2
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions server/features/mgmt_api_topics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,42 @@ Feature: Management API - Topics
"""
When we get "/topics"
Then we get list with 1 items

Scenario: Validate if navigation exists
When we post to "/topics"
"""
{
"label": "topic1",
"company": "#companies._id#",
"topic_type": "wire",
"query": "topic1",
"is_global": true,
"user": "#users._id#",
"navigation": ["619277ef8bbbbfac6034aab7"]
}
"""
Then we get response code 400

When we post to "navigations"
"""
{
"name": "navigation1",
"description": "navigation1",
"order": 1
}
"""
Then we get response code 201

When we post to "/topics"
"""
{
"label": "topic1",
"company": "#companies._id#",
"topic_type": "wire",
"query": "topic1",
"is_global": true,
"user": "#users._id#",
"navigation": ["#navigations._id#"]
}
"""
Then we get response code 201

0 comments on commit c55efe2

Please sign in to comment.