Closed edmargomes closed 9 years ago
Thanks!
@edmargomes I reverted the pull request. Could you also be so kind as to write a test case as well?
Sorry, I haven't had my coffee yet so I merged it without looking at it. Let me know if you need direction.
No problem, I really need direction to create the test .Can you help-me?
Yes I can. I can't right now but I'll reply here with what you need later today.
On Thursday, April 2, 2015, Edmar Gomes notifications@github.com wrote:
No problem, I really need direction to create the test .Can you help-me?
— Reply to this email directly or view it on GitHub https://github.com/poetic/drupal-services-api/pull/1#issuecomment-88933065 .
@edmargomes No worries, I added the test. If you look at commit b4d3d65c03712612d4ddfe178755a32c2287bcdd you can see how. Basically, I used nock to mock the request, and mapped it to a response from nock-responses.json
. While it does not test the correct params are being passed (and I feel it shouldn't, that's Drupal's domain) it tests that the correct url is being hit with the right type of request.
@edmargomes I just noticed your addition is not documented. Could you open a new pull requests to add it to the README?
We are using in project with Ambidex and Drupal 7.
Thanks @sebas5384 for help me in this code.