-
Notifications
You must be signed in to change notification settings - Fork 86
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
Test Segment tracking after user creation #357
Test Segment tracking after user creation #357
Conversation
77b8f65
to
9c821c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic. Good work @vidmantas!
Did you want to merge this now or test the other calls in the context of this PR? I'd be fine with either. |
This is what I imagined we'd have. Great work, @vidmantas |
I've added a test for another users controller method, however before proceeding with other occurrences of Segment tracking wanted to raise a question on organizing tests: now we have pretty big chunks of repetitive "setup" part before assertions on some |
@vidmantas We already had a few attempts at reducing test boilerplate, especially with creating records/payloads, but weren't happy with the results. Feel free to make a PR with your suggestion. I have a feeling it will be well received. As for this, we can consider it ready, so squash/rebase and merge when you get the chance. If you also don't mind, keep the referrenced issue open and add a comment saying what else is needed (as in "the infrastructure for this has been merged, now it's just a matter of writing the individual tests."), with maybe links to the relevant code. |
@vidmantas I second what @begedin said! |
@begedin @joshsmith alright. I just don't have write access to merge, so please do that instead of me and I'll proceed as discussed ;) |
Can you squash? Then we can merge. |
949e9f0
to
2368542
Compare
@joshsmith ah, right, sorry. Done now :) |
🙌 ! |
Tries to implement segment tracking testing requested in #350
Used some ideas from http://blog.plataformatec.com.br/2015/10/mocks-and-explicit-contracts/
I don't think that message sending to
self
is useful in development, so I've created a separate implementation to be plugged in for testing only.