summaryrefslogtreecommitdiffstats
path: root/src/test/resources
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2019-01-31 13:36:07 +0100
committerromaingimbert <romain.gimbert@orange.com>2019-01-31 13:39:01 +0100
commitcd65ca359cee4d5c46ca61df2c4d022f15ec08b6 (patch)
tree4aa83a80fe04038afe153bfbe153daefbd855102 /src/test/resources
parentcf9e2869aaff92b58fb1806b2403a6790d62a709 (diff)
multiple identical hub
-change hubresource -add test Change-Id: Ibb8ef363b84d9bcff83b1786cf7547a7660f957e Issue-ID: EXTAPI-187 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'src/test/resources')
-rw-r--r--src/test/resources/karatetest/data/subscriber.json3
-rw-r--r--src/test/resources/karatetest/features/03--Subscriber.feature18
2 files changed, 18 insertions, 3 deletions
diff --git a/src/test/resources/karatetest/data/subscriber.json b/src/test/resources/karatetest/data/subscriber.json
index e7c08ad..8fa7370 100644
--- a/src/test/resources/karatetest/data/subscriber.json
+++ b/src/test/resources/karatetest/data/subscriber.json
@@ -1,16 +1,13 @@
[
{
- "id": "id",
"callback": "http://localhost:8080/test",
"query": "eventType = ServiceOrderCreationNotification"
},
{
- "id": "id",
"callback": "http://localhost/test",
"query": "eventType=ServiceOrderStateChangeNotification"
},
{
- "id": "id",
"callback": "http://localhost/test",
"query": "eventType=ServiceOrderItemStateChangeNotification"
}
diff --git a/src/test/resources/karatetest/features/03--Subscriber.feature b/src/test/resources/karatetest/features/03--Subscriber.feature
index 0d21ccb..6e4b884 100644
--- a/src/test/resources/karatetest/features/03--Subscriber.feature
+++ b/src/test/resources/karatetest/features/03--Subscriber.feature
@@ -38,6 +38,24 @@ Given url location
When method delete
Then status 204
+Scenario: testCreation2SameSubscribers
+Given path 'hub'
+And request data[0]
+When method post
+Then status 201
+And def location = responseHeaders['Location'][0]
+Given path 'hub'
+And request data[0]
+When method post
+Then status 400
+And match $ contains { message : 'Bad Request'}
+Given path 'hub'
+When method get
+And match $ == '#[1]'
+Given url location
+When method delete
+Then status 204
+
Scenario: testGetByIdSubscriber
Given path 'hub'
And request data[0]