Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for removing OrderItem fields #609

Open
lukehesluke opened this issue Oct 18, 2023 · 0 comments
Open

Tests for removing OrderItem fields #609

lukehesluke opened this issue Oct 18, 2023 · 0 comments

Comments

@lukehesluke
Copy link
Contributor

According to the Open Booking API spec, §8.4.4:

and if a property is no longer present the Broker must remove it

It might be worth creating tests that check that OrderItem fields can indeed be removed as is described here. This has actually specifically come up in work I've done, where a faulty SQL query meant that keys were not being successfully removed from a JSON object. This issue was not noticed by Test Suite.


Afaict, it only makes sense that these OrderItem fields could be removed:

  • accessPass
  • accessCode
  • accessChannel
  • additionalProperty
  • cancellationMessage
  • customerNotice

And, for OrderItem in OrderProposal (I haven't looked into this in as much detail so please correct me if any of these fields are required within an OrderProposal's OrderItem):

  • attendeeDetailsRequired
  • attendee
  • orderItemIntakeForm
  • orderItemIntakeFormResponse

An example of the kind of scenario that these tests would protect against: A system accidentally broadcasts a customerNotice to all its customers' Orders which contains personal data. Are they able to delete it?


The Test Interface would need a change too. Options:

  1. Update existing actions like CustomerNoticeSimulateAction to be able to omit the field and have that treated as a removal of the field
  2. Create new actions to remove each removable field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant