-
Notifications
You must be signed in to change notification settings - Fork 78
Use VCR for tests #42
base: master
Are you sure you want to change the base?
Conversation
Another cool thing is:
100% LOC coverage 💃 |
@marcinbunsch Can I get a merge? 👍 |
I finally found time to play around with. The work you've done is impressive. Here's the issue - it will only work on your dummy account, which is prepopulated with files. When I run it on my empty account, I get 14 failures. I think we should rethink the strategy here. Let's assume that the account starts empty. So we need to populate before testing and we need to avoid testing of account-specific things like the email or tokens. In the end it's irrelevant who's account we run it on, it will work properly. Let me know if you want to work on it, if not, I can take it from here. |
Hmm, we could have a fixture to say "if recording for VCR, then do these pre-populate steps" or something. Then it would work regardless of whether it's a dummy account or not. I don't mind pairing on it 👍 Let me rebase to fix the merge conflicts also. |
I created a dummy user that I can delete afterwards just in case I leak any data, but I've added the authorisation to the filtered config so if they're re-recorded in the future they'll be no issues
You can now specify a connection file for live testing
Make pending for now
Since we now have an additional `list=false`
@petems I've added you to a group which gives you write access to the repo. One, you've done great work 👍 Two, it will make it easier to pair and bring this PR home. Feel free to add this as a branch within futuresimple/dropbox-api. |
@marcinbunsch Awesome thanks! I'm gonna rebase this with a basic version of recording the responses in a smaller chunk so it can be merged, then we can pair on the implementation after 👍 |
I've got a big-refactor on my branch that uses faraday instead of oauth, not sure if you guys are up for that, but I realised I would have no way of easily proving that it worked.
So, I enabled VCR for this project! The recordings were made to a dummy Dropbox that I don't care about, so there shouldn't be any issues with data leakage (I did filter the headers though, in case things need to be re-recorded! 😄)
@marcinbunsch any thoughts? 👍