Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor "can gzip requests" spec to fix race condition (#577)
This spec had a race condition caused by the date and time in the "local file header" of the zip file. See https://en.wikipedia.org/wiki/ZIP_(file_format)#File_headers This could result in the zip file that we compute during the test to be different from the zip file that the transporter sends in the HTTP request. This in turn caused stub_request(:post, url) to not match the request made in the transporter. By asserting that decompressing the transporter's request body results in the original JSON, we avoid this race condition and clarify the intention of the test assertion. Fixes #569
- Loading branch information