Matt,

Thanks.

Continued work on this problem has shifted the emphasis, but I'm still
blocked and could use help.

I've changed the request from a GET to a POST, just to remove
uncertainty around the availability of the request.body for processing
in the controller.

I now have the following error from the controller...

    JSON::ParserError: unexpected token at 'loan_request=4000000'

...where the controller code line in question is...

    data = ActiveSupport::JSON.decode(request.body.read)

...and the ActionController::TestCase test initiation of the error
was...

    request = 4_000_000
    post :loan, {:loan_request=>request, :format => :json}

...finally the test log of the request is...

  Processing by Sec223fAcquisitionController#loan as JSON
  Parameters: {"loan_request"=>"4000000"}
Completed 500 Internal Server Error in 28ms

Can someone please offer thoughts, or, perhaps better, an example of the
same kind of attempt, successfully made using either Rais TestCase or
RSpec?

Thanks,

Grar

-- 
Posted via http://www.ruby-forum.com/.

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to