Angeben des Inhaltstyps in rspec

Ich versuche, einen rspec-Test zu erstellen, der JSON (oder XML) über POST sendet. Ich kann es jedoch nicht wirklich zum Laufen bringen:

    json = {.... data ....}.to_json
    post '/model1.json',json,{'CONTENT_TYPE'=>'application/json'}

und da

    json = {.... data ....}.to_json
    post '/model1.json',json,{'Content-Type'=>'application/json'}

irgendwelche Ideen? VIELEN DANK

Antworten auf die Frage(16)

Ihre Antwort auf die Frage