Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Fix sending JSON examples #161

Merged
merged 4 commits into from
Jan 13, 2015
Merged

Conversation

maxlinc
Copy link
Collaborator

@maxlinc maxlinc commented Nov 25, 2014

This fixes a bug reported by @rafaelportela. Pacto wasn't properly sending
JSON request examples if they were written as a JSON object in the contract. It may
have sent them if they were written as a JSON string.

This introduces rudimentary support for media types, but probably should be just a
temporary solution until a more extensible system is created for #154.

@maxlinc
Copy link
Collaborator Author

maxlinc commented Nov 25, 2014

This should probably have a test case before it gets merged. I've got a sample contract and API from @rafaelportela that I was using to test. That scenario could be added after refactoring so its more in line w/ other samples.

I'd do it now, but I've got to catch a bus very early in the AM. So 🌃 for now.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.21%) when pulling 90f5035 on maxlinc:fix_sending_json into 9c47be2 on thoughtworks:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.15%) when pulling 4b2f068 on maxlinc:fix_sending_json into 74d11e0 on thoughtworks:master.

@rafaelportela
Copy link

It works perfectly with my examples! =]

maxlinc added a commit that referenced this pull request Jan 13, 2015
@maxlinc maxlinc merged commit 9f507b5 into thoughtworks:master Jan 13, 2015
@maxlinc maxlinc deleted the fix_sending_json branch January 13, 2015 20:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants