From 68364ae464c1078ff61f920d8564e2bbb5a976a2 Mon Sep 17 00:00:00 2001 From: hongwei Date: Fri, 19 Aug 2022 13:25:50 +0200 Subject: [PATCH] test/fixed the failed tests --- obp-api/src/test/scala/code/api/v3_0_0/FirehoseTest.scala | 8 ++++---- obp-api/src/test/scala/code/api/v4_0_0/FirehoseTest.scala | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/obp-api/src/test/scala/code/api/v3_0_0/FirehoseTest.scala b/obp-api/src/test/scala/code/api/v3_0_0/FirehoseTest.scala index bf0544d00..bfce847f4 100644 --- a/obp-api/src/test/scala/code/api/v3_0_0/FirehoseTest.scala +++ b/obp-api/src/test/scala/code/api/v3_0_0/FirehoseTest.scala @@ -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) diff --git a/obp-api/src/test/scala/code/api/v4_0_0/FirehoseTest.scala b/obp-api/src/test/scala/code/api/v4_0_0/FirehoseTest.scala index e397c9ede..14d5a8755 100644 --- a/obp-api/src/test/scala/code/api/v4_0_0/FirehoseTest.scala +++ b/obp-api/src/test/scala/code/api/v4_0_0/FirehoseTest.scala @@ -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)