Skip to content
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

Compare encoded bodies instead of data when possible Fixes #23 #24

Merged
merged 4 commits into from
Aug 10, 2015

Conversation

dasmer
Copy link
Contributor

@dasmer dasmer commented Aug 10, 2015

We now unwrap the HTTPBody NSDatas into and compare using isEqual

@@ -13,8 +13,20 @@ struct Cassette {
for interaction in interactions {
let r = interaction.request

let equivalentBody: Bool

if let rBody = r.HTTPBody,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid the shortened vars here and just call this requestBody?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, derp. Just noticed we already have requestBody... I'm just confused by the naming. What is r vs. what is request?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe interactionRequestBody?

@eliperkins
Copy link
Contributor

Nice fix! One question around variable naming and then 🍏

@dasmer
Copy link
Contributor Author

dasmer commented Aug 10, 2015

changed the naming and moved the HTTPBody equality check into into a private function

@eliperkins
Copy link
Contributor

LGTM. 🍏

@lionel-alves
Copy link
Contributor

One question then 🍏!

dasmer added a commit that referenced this pull request Aug 10, 2015
Compare encoded bodies instead of data when possible Fixes #23
@dasmer dasmer merged commit f74e5fa into master Aug 10, 2015
@dasmer dasmer deleted the daz/equalBody branch August 10, 2015 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants