mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 19:36:50 +00:00
Merge remote-tracking branch 'hongwei/develop' into develop
This commit is contained in:
commit
b423841de6
@ -4094,7 +4094,7 @@ object SwaggerDefinitionsJSON {
|
||||
List(PostViewJsonV400(viewIdExample.value, isSystemExample.value.toBoolean))
|
||||
)
|
||||
val postCreateUserWithRolesJsonV400 = PostCreateUserWithRolesJsonV400(
|
||||
userIdExample.value,
|
||||
usernameExample.value,
|
||||
s"dauth.${providerExample.value}",
|
||||
List(createEntitlementJSON)
|
||||
)
|
||||
|
||||
@ -134,24 +134,6 @@ class EntitlementTests extends V400ServerSetupAsync with DefaultUsers {
|
||||
}
|
||||
}
|
||||
|
||||
scenario("We try to - createUserWithRoles - short user_id ", ApiEndpoint3, VersionOfApi) {
|
||||
And("We make the request")
|
||||
val createEntitlements = List(CreateEntitlementJSON(
|
||||
bank_id = testBankId1.value,
|
||||
role_name = CanCreateBranch.toString()
|
||||
), CreateEntitlementJSON(
|
||||
bank_id = testBankId1.value,
|
||||
role_name = CanUpdateBranch.toString()
|
||||
))
|
||||
val postJson = SwaggerDefinitionsJSON.postCreateUserWithRolesJsonV400.copy(username ="xx", roles= createEntitlements)
|
||||
val requestGet = (v4_0_0_Request / "user-entitlements").GET <@ (user1)
|
||||
val responseGet = makePostRequestAsync(requestGet, write(postJson))
|
||||
Then("We should get a 200")
|
||||
responseGet map { r =>
|
||||
r.code should equal(400)
|
||||
r.body.toString contains (InvalidUserId) shouldBe(true)
|
||||
}
|
||||
}
|
||||
scenario("We try to - createUserWithRoles - wrong user provider ", ApiEndpoint3, VersionOfApi) {
|
||||
And("We make the request")
|
||||
val createEntitlements = List(CreateEntitlementJSON(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user