poetic / drupal-services-api

A Node.js client for interacting with Drupal 7 Services
14 stars 4 forks source link

Added feature to create user. #1

Closed edmargomes closed 9 years ago

edmargomes commented 9 years ago

We are using in project with Ambidex and Drupal 7.

Thanks @sebas5384 for help me in this code.

DanielOchoa commented 9 years ago

Thanks!

DanielOchoa commented 9 years ago

@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.

edmargomes commented 9 years ago

No problem, I really need direction to create the test .Can you help-me?

DanielOchoa commented 9 years ago

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 .

DanielOchoa commented 9 years ago

@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.

DanielOchoa commented 9 years ago

@edmargomes I just noticed your addition is not documented. Could you open a new pull requests to add it to the README?