The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Rails tip: Functional testing ajax calls

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Patrick Lenz

Posts: 168
Nickname: scoop
Registered: Apr, 2005

Patrick Lenz is the lead developer at freshmeat.net and a contributor to the typo weblog engine
Rails tip: Functional testing ajax calls Posted: Jul 12, 2005 1:28 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Patrick Lenz.
Original Post: Rails tip: Functional testing ajax calls
Feed Title: poocs.net
Feed URL: http://feeds.feedburner.com/poocsnet
Feed Description: Personal weblog about free and open source software, personal development projects and random geek buzz.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Patrick Lenz
Latest Posts From poocs.net

Advertisement

Just a quick heads up for those of you who like to functional test their applications and are stuck trying to figure out how to pre-populate what your controllers see as @request.raw_post:

def test_image_assign
  @request.env['RAW_POST_DATA'] = "img_1"

  post :image_assign,
    :id => @first_article.id,
    :alignment => "right",
    :paragraph_id => 1

  assert_response :success
end

(taken from the Ajax-based image assignment function I blogged about earlier)

Read: Rails tip: Functional testing ajax calls

Topic: New Rails movie with sound and sugar Previous Topic   Next Topic Topic: Ruby on Rails at Java Forum Stuttgart

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use