diff --git a/obp-api/src/test/scala/code/api/v5_1_0/RegulatedEntityTest.scala b/obp-api/src/test/scala/code/api/v5_1_0/RegulatedEntityTest.scala index e48e3254ff..5d7696209c 100644 --- a/obp-api/src/test/scala/code/api/v5_1_0/RegulatedEntityTest.scala +++ b/obp-api/src/test/scala/code/api/v5_1_0/RegulatedEntityTest.scala @@ -23,8 +23,9 @@ class RegulatedEntityTest extends V510ServerSetup { object VersionOfApi extends Tag(ApiVersion.v5_1_0.toString) object ApiEndpoint1 extends Tag(nameOf(Implementations5_1_0.createRegulatedEntity)) object ApiEndpoint2 extends Tag(nameOf(Implementations5_1_0.getRegulatedEntityById)) - object ApiEndpoint3 extends Tag(nameOf(Implementations5_1_0.deleteRegulatedEntity)) - + object ApiEndpoint3 extends Tag(nameOf(Implementations5_1_0.getRegulatedEntityById)) + object ApiEndpoint4 extends Tag(nameOf(Implementations5_1_0.deleteRegulatedEntity)) + feature(s"test $ApiEndpoint1 version $VersionOfApi - Unauthorized access") { scenario("We will call the endpoint without user credentials", ApiEndpoint1, VersionOfApi) { When("We make a request v5.1.0") @@ -35,7 +36,7 @@ class RegulatedEntityTest extends V510ServerSetup { response510.body.extract[ErrorMessage].message should equal(UserNotLoggedIn) } } - + feature(s"test $ApiEndpoint1 version $VersionOfApi - Authorized access") { scenario("We will call the endpoint with user credentials but without a proper entitlement", ApiEndpoint1, VersionOfApi) { When("We make a request v5.1.0") @@ -46,7 +47,7 @@ class RegulatedEntityTest extends V510ServerSetup { response510.body.extract[ErrorMessage].message should be (UserHasMissingRoles + CanCreateRegulatedEntity) } } - + feature(s"test $ApiEndpoint1 version $VersionOfApi - Authorized access") { scenario("We will call the endpoint with user credentials and a proper entitlement", ApiEndpoint1, VersionOfApi) { Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, CanCreateRegulatedEntity.toString) @@ -60,7 +61,7 @@ class RegulatedEntityTest extends V510ServerSetup { } // ApiEndpoint4 - deleteRegulatedEntity - feature(s"test $ApiEndpoint3 version $VersionOfApi - Unauthorized access") { + feature(s"test $ApiEndpoint4 version $VersionOfApi - Unauthorized access") { scenario("We will call the endpoint without user credentials", ApiEndpoint1, VersionOfApi) { When("We make a request v5.1.0") val request510 = (v5_1_0_Request / "regulated-entities" / "some id").DELETE @@ -70,7 +71,7 @@ class RegulatedEntityTest extends V510ServerSetup { response510.body.extract[ErrorMessage].message should equal(UserNotLoggedIn) } } - feature(s"test $ApiEndpoint3 version $VersionOfApi - Authorized access") { + feature(s"test $ApiEndpoint4 version $VersionOfApi - Authorized access") { scenario("We will call the endpoint with user credentials but without a proper entitlement", ApiEndpoint1, VersionOfApi) { When("We make a request v5.1.0") val request510 = (v5_1_0_Request / "regulated-entities" / "some id").DELETE <@ (user1) @@ -82,7 +83,7 @@ class RegulatedEntityTest extends V510ServerSetup { } - feature(s"test $ApiEndpoint1, $ApiEndpoint2, $ApiEndpoint3 version $VersionOfApi - CRUD") { + feature(s"test $ApiEndpoint1, $ApiEndpoint2, $ApiEndpoint3, $ApiEndpoint4 version $VersionOfApi - CRUD") { scenario("We will call the endpoint with user credentials but without a proper entitlement", ApiEndpoint1, VersionOfApi) { // Create a row Entitlement.entitlement.vend.addEntitlement("", resourceUser1.userId, CanCreateRegulatedEntity.toString)