Generate a code for meetings registrations#3805
Conversation
53f1e4d to
d58e308
Compare
| .to receive(:choose) | ||
| .with(length) | ||
| .exactly(2).times | ||
| .and_return(existing_code, valid_code) |
There was a problem hiding this comment.
@mrcasals, @deivid-rodriguez I need help testing this. Rubocop complains with RSpec/SubjectStub: Do not stub your test subject, can you help me with another way to test this method?
Class generating the code: https://github.com/decidim/decidim/pull/3805/files#diff-6c225d57a5e2477b37660748966d7262R18
There was a problem hiding this comment.
Test looks good and readable to me, I would disable that cop for the test.
There was a problem hiding this comment.
👍 the only thing that comes to mind is moving the choose method to a different object so you can stub it, but that'd be overengineering it IMO.
There was a problem hiding this comment.
Thanks to both, I agree with your comments, so I'll disable the cop for the test.
|
@decidim/lot-core ready to review! |
🎩 What? Why?
Registered participants receive a registration code (8 digit alphanumeric only capital letters and excluding ambiguous characters such as 1, O/0, etc.)
📌 Related Issues
📋 Subtasks
CHANGELOGentry