-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dne 13.4.2010 11:55, Klaus Kaempf napsal(a):
* Lukas Ocilka <lukas.ocilka@suse.cz> [Apr 13. 2010 11:42]:
Hmm, what makes you think RAW_POST_DATA gets ignored ?
- From what I've seen, the RAW_POST_DATA should be used as the request input processed by the Rails core, not by the controller itself.
Right. And my initial tests support that.
Not until you read them from the @request manually or at least not in the test environment. Pepa has, kind-of, confirmed that.
If I send the very same XML via curl --data-binary, it works correctly.
I still do not know what "works correctly" means for you. What does your receiving controller look like and how does it parse the request ?
Works correctly => E.g., :create creates a new customer. Using RAW_POST_DATA does not create it and reports that all the required fields were missing. Anyway, solved using a different method. All I wanted is to test whether we correctly catch an application exception in the RoR layers. I used mocha: - --- cut --- Customer.any_instance.stubs(:initialize).raises(Exception, '[EXPECTED ERROR]...') - --- cut --- Which throws an exception while creating the new Customer object at the beginning of the 'create' function. Thx && Bye Lukas -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iD8DBQFLxHKaVSqMdRCqTiwRAkOPAKCB4H5bWB7HhzzXsDbqGWY6xc9cSQCeK170 lyE5B+nK6LmXv1E8CsSd8oA= =lDjG -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-ruby+help@opensuse.org