-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
Looks great, will have proper look on Thursday. Thanks so much. |
Hi @aydun Thanks for all the test code, the extension really needed a membership expert to write that stuff as I'm not familiar with the intricacies of it. I confirm all the tests are passing for me. One question about the tests: you've added membership code to the existing The code I was remembering is at Which has branches for membership. However, if I understand correctly, I don't think the membership So actually, that code (my code there) is pretty useless (until the extension does do one offs) and therfore it makes no difference adding to the existing test; so I think it's fine. Do you agree? Also, I'm considering publishing this as 'stable' now these membership things have been fixed because it's been in use for years and the membership was the bit I was worried about. Thoughts on that anyone? |
I wouldn't call myself a membership expert, but I know a bit about it! As you say, I added membership tests to As regards the code you highlighted ... I couldn't see how that membership So, I'd suggest we remove that code and reshuffle the tests so that we explicitly test membership and non-membership scenarios. If you agree I'll push another commit. A 'stable' release would be good - perhaps we can get @wmortada and @Upperholme to confirm their issues are resolved first? |
I'd be tempted to comment the code out with a note, rather than remove it, just in case issue #12 ever gets implemented. V happy for you to do that. Without that membership-specific thing in place I'm not so bothered about having a separate test for non memberships, since the membership one is identical but plus membership. So the membership test would still fail if the normal case was failling. And if there is a difference in future we can split the tests up then? Over to you. Many thanks, and great work @wmortada for grok'ing the code to realise that one API call was causing all the problems! |
Expect to see failures (fixed in next commits) Add tests for issue artfulrobot#27. For a existing membership (both Current & Grace) where payment was not GC and renewal is GC, the dates and status should not be changed by setting up the mandate. Modify testWebhookPaymentConfirmationFirst() to be more specific about dates Not sure whether this is the _desired_ behaviour re dates, but it documents the _current_ behaviour which should help if we want to change.
Comment out unused code Add note re Membership Dates
dbbf41c
to
a881a2a
Compare
Ok, I've reinstated the original test so we explicitly test both membership and non-membership. I've squashed the commits back to 2 so I think this ready to merge. |
I've added some tests for memberships in the first commit which shows a problem.
The second commit fixes that.
For background, see analysis by @wmortada in #42