mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:06:49 +00:00
fixtest: GET my dynamic entity endpoint gets records the user created,
not just records with hasPersonalEntity=true. Previous behaviour was confusing.
This commit is contained in:
parent
c0a0dfed0b
commit
aaf04ee036
@ -1725,20 +1725,20 @@ class DynamicEntityTest extends V400ServerSetup {
|
||||
}
|
||||
|
||||
{
|
||||
Then("User1 get my foobar, only return his own records, only one")
|
||||
Then("User1 get my foobar, returns his own records (including those created via non-/my endpoints)")
|
||||
val requestGetFoobars = (dynamicEntity_Request / "my" / "FooBar").GET <@ (user1)
|
||||
val responseGetFoobars = makeGetRequest(requestGetFoobars)
|
||||
responseGetFoobars.code should equal(200)
|
||||
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
|
||||
}
|
||||
{
|
||||
Then("User2 get my foobar, only return his own records, only one")
|
||||
Then("User2 get my foobar, returns his own records (including those created via non-/my endpoints)")
|
||||
val requestGetFoobars = (dynamicEntity_Request / "my" / "FooBar").GET <@ (user2)
|
||||
val responseGetFoobars = makeGetRequest(requestGetFoobars)
|
||||
responseGetFoobars.code should equal(200)
|
||||
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
|
||||
}
|
||||
|
||||
{
|
||||
@ -1851,20 +1851,20 @@ class DynamicEntityTest extends V400ServerSetup {
|
||||
}
|
||||
|
||||
{
|
||||
Then("User1 get my foobar, only return his own records, only one")
|
||||
Then("User1 get my foobar, returns his own records (including those created via non-/my endpoints)")
|
||||
val requestGetFoobars = (dynamicEntity_Request / "banks" / testBankId1.value / "my" / "FooBar").GET <@ (user1)
|
||||
val responseGetFoobars = makeGetRequest(requestGetFoobars)
|
||||
responseGetFoobars.code should equal(200)
|
||||
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
|
||||
}
|
||||
{
|
||||
Then("User2 get my foobar, only return his own records, only one")
|
||||
Then("User2 get my foobar, returns his own records (including those created via non-/my endpoints)")
|
||||
val requestGetFoobars = (dynamicEntity_Request / "banks" / testBankId1.value / "my" / "FooBar").GET <@ (user2)
|
||||
val responseGetFoobars = makeGetRequest(requestGetFoobars)
|
||||
responseGetFoobars.code should equal(200)
|
||||
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
|
||||
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user