mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 14:46:49 +00:00
More update view test fixes
This commit is contained in:
parent
361e6d53a9
commit
c5e997c2f5
@ -63,26 +63,26 @@ class API1_2_1Test extends ServerSetup{
|
||||
implicit val dateFormats = net.liftweb.json.DefaultFormats
|
||||
|
||||
val viewFileds = List(
|
||||
"can_see_transaction_this_bank_account","can_see_transaction_other_bank_account",
|
||||
"can_see_transaction_metadata","can_see_transaction_label","can_see_transaction_amount",
|
||||
"can_see_transaction_type","can_see_transaction_currency","can_see_transaction_start_date",
|
||||
"can_see_transaction_finish_date","can_see_transaction_balance","can_see_comments",
|
||||
"can_see_owner_comment","can_see_tags","can_see_images","can_see_bank_account_owners",
|
||||
"can_see_bank_account_type","can_see_bank_account_balance","can_see_bank_account_currency",
|
||||
"can_see_bank_account_label","can_see_bank_account_national_identifier",
|
||||
"can_see_bank_account_swift_bic","can_see_bank_account_iban","can_see_bank_account_number",
|
||||
"can_see_bank_account_bank_name","can_see_other_account_national_identifier",
|
||||
"can_see_other_account_swift_bic","can_see_other_account_iban",
|
||||
"can_see_other_account_bank_name","can_see_other_account_number",
|
||||
"can_see_other_account_metadata","can_see_other_account_kind","can_see_more_info",
|
||||
"can_see_url","can_see_image_url","can_see_open_corporates_url","can_see_corporate_location",
|
||||
"can_see_physical_location","can_see_public_alias","can_see_private_alias","can_add_more_info",
|
||||
"can_add_url","can_add_image_url","can_add_open_corporates_url","can_add_corporate_location",
|
||||
"can_add_physical_location","can_add_public_alias","can_add_private_alias",
|
||||
"can_delete_corporate_location","can_delete_physical_location","can_edit_owner_comment",
|
||||
"can_add_comment","can_delete_comment","can_add_tag","can_delete_tag","can_add_image",
|
||||
"can_delete_image","can_add_where_tag","can_see_where_tag","can_delete_where_tag"
|
||||
)
|
||||
"can_see_transaction_this_bank_account","can_see_transaction_other_bank_account",
|
||||
"can_see_transaction_metadata","can_see_transaction_label","can_see_transaction_amount",
|
||||
"can_see_transaction_type","can_see_transaction_currency","can_see_transaction_start_date",
|
||||
"can_see_transaction_finish_date","can_see_transaction_balance","can_see_comments",
|
||||
"can_see_narrative","can_see_tags","can_see_images","can_see_bank_account_owners",
|
||||
"can_see_bank_account_type","can_see_bank_account_balance","can_see_bank_account_currency",
|
||||
"can_see_bank_account_label","can_see_bank_account_national_identifier",
|
||||
"can_see_bank_account_swift_bic","can_see_bank_account_iban","can_see_bank_account_number",
|
||||
"can_see_bank_account_bank_name","can_see_other_account_national_identifier",
|
||||
"can_see_other_account_swift_bic","can_see_other_account_iban",
|
||||
"can_see_other_account_bank_name","can_see_other_account_number",
|
||||
"can_see_other_account_metadata","can_see_other_account_kind","can_see_more_info",
|
||||
"can_see_url","can_see_image_url","can_see_open_corporates_url","can_see_corporate_location",
|
||||
"can_see_physical_location","can_see_public_alias","can_see_private_alias","can_add_more_info",
|
||||
"can_add_url","can_add_image_url","can_add_open_corporates_url","can_add_corporate_location",
|
||||
"can_add_physical_location","can_add_public_alias","can_add_private_alias",
|
||||
"can_delete_corporate_location","can_delete_physical_location","can_edit_narrative",
|
||||
"can_add_comment","can_delete_comment","can_add_tag","can_delete_tag","can_add_image",
|
||||
"can_delete_image","can_add_where_tag","can_see_where_tag","can_delete_where_tag"
|
||||
)
|
||||
|
||||
|
||||
//create the application
|
||||
@ -1075,7 +1075,7 @@ class API1_2_1Test extends ServerSetup{
|
||||
val createdView : ViewJSON = creationReply.body.extract[ViewJSON]
|
||||
|
||||
When("we don't use an access token")
|
||||
val reply = putView(bankId, bankAccount.id, createdView.id, viewUpdateJson(createdView), user1)
|
||||
val reply = putView(bankId, bankAccount.id, createdView.id, viewUpdateJson(createdView), None)
|
||||
Then("we should get a 400")
|
||||
reply.code should equal(400)
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ class API1_2Test extends ServerSetup{
|
||||
"can_see_transaction_metadata","can_see_transaction_label","can_see_transaction_amount",
|
||||
"can_see_transaction_type","can_see_transaction_currency","can_see_transaction_start_date",
|
||||
"can_see_transaction_finish_date","can_see_transaction_balance","can_see_comments",
|
||||
"can_see_owner_comment","can_see_tags","can_see_images","can_see_bank_account_owners",
|
||||
"can_see_narrative","can_see_tags","can_see_images","can_see_bank_account_owners",
|
||||
"can_see_bank_account_type","can_see_bank_account_balance","can_see_bank_account_currency",
|
||||
"can_see_bank_account_label","can_see_bank_account_national_identifier",
|
||||
"can_see_bank_account_swift_bic","can_see_bank_account_iban","can_see_bank_account_number",
|
||||
@ -78,7 +78,7 @@ class API1_2Test extends ServerSetup{
|
||||
"can_see_physical_location","can_see_public_alias","can_see_private_alias","can_add_more_info",
|
||||
"can_add_url","can_add_image_url","can_add_open_corporates_url","can_add_corporate_location",
|
||||
"can_add_physical_location","can_add_public_alias","can_add_private_alias",
|
||||
"can_delete_corporate_location","can_delete_physical_location","can_edit_owner_comment",
|
||||
"can_delete_corporate_location","can_delete_physical_location","can_edit_narrative",
|
||||
"can_add_comment","can_delete_comment","can_add_tag","can_delete_tag","can_add_image",
|
||||
"can_delete_image","can_add_where_tag","can_see_where_tag","can_delete_where_tag"
|
||||
)
|
||||
@ -1052,7 +1052,7 @@ class API1_2Test extends ServerSetup{
|
||||
Given("a view does not exist")
|
||||
val nonExistantViewId = "asdfasdfasdfasdfasdf"
|
||||
val getReply = getAccountViews(bankId, bankAccount.id, user1)
|
||||
getReply.code should equal (201)
|
||||
getReply.code should equal (200)
|
||||
val views : ViewsJSON = getReply.body.extract[ViewsJSON]
|
||||
views.views.foreach(v => v.id should not equal(nonExistantViewId))
|
||||
|
||||
@ -1072,7 +1072,7 @@ class API1_2Test extends ServerSetup{
|
||||
val createdView : ViewJSON = creationReply.body.extract[ViewJSON]
|
||||
|
||||
When("we don't use an access token")
|
||||
val reply = putView(bankId, bankAccount.id, createdView.id, viewUpdateJson(createdView), user1)
|
||||
val reply = putView(bankId, bankAccount.id, createdView.id, viewUpdateJson(createdView), None)
|
||||
Then("we should get a 400")
|
||||
reply.code should equal(400)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user