Add check for header in integration
This commit is contained in:
@ -104,6 +104,7 @@ func runCreateElectionTests() {
|
|||||||
]
|
]
|
||||||
}`),
|
}`),
|
||||||
Expect().Status().Equal(http.StatusOK),
|
Expect().Status().Equal(http.StatusOK),
|
||||||
|
Expect().Headers("Location").Contains("/election/1"),
|
||||||
)
|
)
|
||||||
|
|
||||||
MustDo(
|
MustDo(
|
||||||
@ -121,6 +122,7 @@ func runCreateElectionTests() {
|
|||||||
]
|
]
|
||||||
}`),
|
}`),
|
||||||
Expect().Status().Equal(http.StatusOK),
|
Expect().Status().Equal(http.StatusOK),
|
||||||
|
Expect().Headers("Location").Contains("/election/2"),
|
||||||
)
|
)
|
||||||
|
|
||||||
MustDo(
|
MustDo(
|
||||||
@ -138,6 +140,7 @@ func runCreateElectionTests() {
|
|||||||
]
|
]
|
||||||
}`),
|
}`),
|
||||||
Expect().Status().Equal(http.StatusOK),
|
Expect().Status().Equal(http.StatusOK),
|
||||||
|
Expect().Headers("Location").Contains("/election/3"),
|
||||||
Expect().Body().JSON().JQ(".voterIdentities").Len().Equal(10),
|
Expect().Body().JSON().JQ(".voterIdentities").Len().Equal(10),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user