Description:
|
My REST adapter integration tests are failing against aerogear.js 1.2.0 latest. However they pass when running them against the aerogear.js 1.2.0 dev version.
Issue: When using the pipeline rest save/update then an empty JSON is sent to the defined endpoint instead of the model's data. For instance in the below example, an empty JSON is sent instead of sending a JSON with the description,
e.g: save = saveMemberPipe.save({ description: "description_2" }
Reproduce: Build the aerogear js version 1.2.0 latest. Replace the aerogear.js dev version of the https://github.com/aerogear/aerogear-js-integration repo with the latest one Get the PULL request: https://github.com/aerogear/aerogear-js-integration/pull/4 Execute: ./servers/jboss-as/setup.sh Execute: grunt integration-jbossas
For debugging with firefox, you can start manually the jboss-as which is already configured by the grunt-jboss-as plugin and then open the QUnit tests.
The debugging shows that the JSON stringify (line https://github.com/aerogear/aerogear-js/blob/master/src/pipeline/adapters/rest.js#L542) of the extraOptions.data is empty. My sense is that the problem is related to the formData https://github.com/aerogear/aerogear-js/blob/master/src/pipeline/adapters/rest.js#L514
block. If I remove this block, the data are sent correctly to the server.
|