byrokrat / giroapp

Command line app for managing autogiro donations.
GNU General Public License v3.0
4 stars 2 forks source link

Import should always break with invalid payee bankgiro account or customer numbers #81

Closed hanneskod closed 6 years ago

hanneskod commented 7 years ago

Invalid here means not the same as recorded in the settings database.

InvalidNodeFilteringListener reads payee account numbers dispatches errors if the account does not match local settings. This is good but not enough:

  1. It requires a NodeEvent to be fired, and that means that we need an actual mandate response node (or similar) for the check to be evaluated. But the payee account is present already in the opening node, and an error should be triggered by that! (Also note that byrokrat/autogiro already validates that payee accounts are constant within a tree (see Visitor/PayeeVisitor), so only the occurence in the opening node needs to be checked.)
  2. To validate the customer number the opening node must be used.

See features-missing/import.feature for two tests that should pass.