test/fixed the failed tests

This commit is contained in:
hongwei 2022-08-19 13:25:50 +02:00
parent 0448af0166
commit 68364ae464
2 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ class FirehoseTest extends V300ServerSetup with PropsReset{
setPropsValues("enable.force_error"->"true")
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.CanUseAccountFirehoseAtAnyBank.toString)
When("We send the request")
val request = (v3_0Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"owner").GET <@ (user1)
val request = (v3_0Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 200 and check the response body")
response.code should equal(200)
@ -41,7 +41,7 @@ class FirehoseTest extends V300ServerSetup with PropsReset{
setPropsValues("allow_firehose_views" -> "true")
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.CanUseAccountFirehoseAtAnyBank.toString)
When("We send the request")
val request = (v3_0Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"owner").GET <@ (user1)
val request = (v3_0Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 200 and check the response body")
response.code should equal(200)
@ -52,7 +52,7 @@ class FirehoseTest extends V300ServerSetup with PropsReset{
scenario("We will call the endpoint missing role", VersionOfApi, ApiEndpoint2) {
setPropsValues("allow_account_firehose" -> "true")
When("We send the request")
val request = (v3_0Request / "banks" / testBankId1.value / "firehose" / "accounts" / "views" / "owner").GET <@ (user1)
val request = (v3_0Request / "banks" / testBankId1.value / "firehose" / "accounts" / "views" / "firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 403 and check the response body")
response.code should equal(403)
@ -62,7 +62,7 @@ class FirehoseTest extends V300ServerSetup with PropsReset{
scenario("We will call the endpoint missing props ", VersionOfApi, ApiEndpoint2) {
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.CanUseAccountFirehoseAtAnyBank.toString)
When("We send the request")
val request = (v3_0Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"owner").GET <@ (user1)
val request = (v3_0Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 400 and check the response body")
response.code should equal(400)

View File

@ -28,7 +28,7 @@ class FirehoseTest extends V400ServerSetup with PropsReset{
setPropsValues("allow_account_firehose" -> "true")
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.CanUseAccountFirehoseAtAnyBank.toString)
When("We send the request")
val request = (v4_0_0_Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"owner").GET <@ (user1)
val request = (v4_0_0_Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/ "firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 200 and check the response body")
response.code should equal(200)
@ -38,7 +38,7 @@ class FirehoseTest extends V400ServerSetup with PropsReset{
setPropsValues("allow_firehose_views" -> "true")
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.CanUseAccountFirehoseAtAnyBank.toString)
When("We send the request")
val request = (v4_0_0_Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"owner").GET <@ (user1)
val request = (v4_0_0_Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/ "firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 200 and check the response body")
response.code should equal(200)
@ -48,7 +48,7 @@ class FirehoseTest extends V400ServerSetup with PropsReset{
scenario("We will call the endpoint missing role", VersionOfApi, ApiEndpoint1) {
setPropsValues("allow_account_firehose" -> "true")
When("We send the request")
val request = (v4_0_0_Request / "banks" / testBankId1.value / "firehose" / "accounts" / "views" / "owner").GET <@ (user1)
val request = (v4_0_0_Request / "banks" / testBankId1.value / "firehose" / "accounts" / "views" / "firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 403 and check the response body")
response.code should equal(403)
@ -58,7 +58,7 @@ class FirehoseTest extends V400ServerSetup with PropsReset{
scenario("We will call the endpoint missing props ", VersionOfApi, ApiEndpoint1) {
Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, ApiRole.CanUseAccountFirehoseAtAnyBank.toString)
When("We send the request")
val request = (v4_0_0_Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/"owner").GET <@ (user1)
val request = (v4_0_0_Request / "banks" / testBankId1.value /"firehose" / "accounts" / "views"/ "firehose").GET <@ (user1)
val response = makeGetRequest(request)
Then("We should get a 400 and check the response body")
response.code should equal(400)