Repository navigation
Conversation
|
Thanks for pulling the two approaches together! This works for us: the electronic address keeps its API, and Two things I'd fix before merging, plus a few small notes. 1. assert [], errors
assert [], ["boom"] # => passesSince all validation checks in assert_empty errors, errors.join("\n")2. if !exclude_contact && trade_contact.present?
trade_contact.to_xml(xml, version: version)
elsif person_name.present?
...With unless exclude_contact
if trade_contact.present?
trade_contact.to_xml(xml, version: version)
elsif person_name.present?
xml['ram'].DefinedTradeContact do
xml['ram'].PersonName person_name
end
end
end(Finding 1 is why the tests don't catch this one.) Smaller notes, take them or leave them
|
|
@ahmedm10 OMG, thanks for your remarks, that's embarassing. I think I'll do the correct thing and separate out the test helper changes into a separate PR with better checking and then rebase this PR and look through your notes. Thanks for the quick answer. I'll hopefully get to this latest next wednesday. |
|
This works for us as well 👍 We won't be able to switch back to upstream quite yet after this, because we also would need PR #58, but that is another matter. Thank you for putting this together! |
|
@neuged Yeah, please give me some time for this, I went through a rough patch recently and didn't find the energy and time to work on this. I'm slowly working my way through the pile, but some of this actually needs my brain. Thanks for your patience and thanks to you both for your feedback. |
|
No problem at all! Thank you! |
(Also refactors tests for brevity and readability, introducing an xml assertion
This removes a Reason from AppliedTradeAllowanceCharge as well, as this seems to be out of spec
0e7f732 to
11cfa2d
Compare
@ahmedm10 @neuged could you two please take a look at this PR and tell me if this variant of your two approaches would satisfy your needs? I had to wrestle with this a bit, tried various combinations and think that this, while being slightly convoluted, is probably the best alternative.