I am trying to test an action which is supposed to give a json
response The url goes something line /blah/model.json

When I POST to that URL using curl like this

curl -H "Content-Type:application/json" -H "Accept:appn/json"    -d
"data"   http://localhost:3000/blah/model.json  it works just fine.

In my test functional test I have this method

def post_json (data)
   post "/blah/model.json", {:data => data.to_json}, {'Content-Type'
=> 'application/json', 'Accept' => 'application/json'}
end

When I run this test I get the error

ActionController::UnknownAction: No action responded to
/blah/model.json. Actions: index

The route is defined like this.

 map.connect '/blah/:model.:format', :controller => 'xfer', :action =>
'index' ,  :conditions => { :method => :post }

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to