search for: post_via_redirect

Displaying 11 results from an estimated 11 matches for "post_via_redirect".

2007 Oct 26
1
post_via_redirect - testing problem
...checkout action can be called with a get (to create the empty form) or a post (to send the details to make a new Order object) request. In my testing, the get request works fine but the post request seems to not create the order object correctly: here''s the problem part of the test: post_via_redirect "/store/checkout", { :name => "Dave Thomas", :address => "123 The Street", :email => "dave-kbbdpT5sCmpWk0Htik3J/w@public.gmane.org", :pay_type => "check"...
2007 Sep 23
4
Story Runner, autoincrementing
I''ve written a story and I run into a snag. I''ve written the create_forum method and told it to set the id to 1 but when it creates the forum the id is autoincremented. My forums table is empty but the id keeps incrementing the newest record on creation. When I run the story it comes out as something like 59 which fails my story because I''m asking it to look at /forums/1
2007 Dec 23
0
basic authentication
When I try to get a page via post_via_redirect on a project that uses the new rails 2 http authentication, for example: post_via_redirect path, {:name_of_object => { :att => "test" }}, :authorization => authorize then the post works, but then I''m being redirected to the show action where I''m...
2008 Jan 21
3
Story runner "macros"
...ng.eli.st/blog/2007/10/8/story-runner-top-to-bottom-screencast One thing I''m not sure of is the feature where he writes things like: When "I POST to", "/articles", :post => {:title => "Title", :body => "Body") do | path, params| post_via_redirect path, params end This bothers me because it seems an abrupt level jump. Most of the stories are written at a level where the goal donor can understand them, For example, I''m pretty sure that the above when clause started life as somethign more like When "I add an article&qu...
2008 Jul 11
4
how to debug using rspec stories
Hello. I just started to use rspec stories. I followed the following tutorial: http://www.tomtenthij.co.uk/2008/1/25/rspec-plain-text-story-runner-on-a-fresh-rails-app So I implemented my story and some of the steps are: (...) When "user creates a product" do post "products/new", :name => @name end Then "there should be a product named
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it seems that there''s a hole in Rails integration testing and multipart form posting. David offered to incorporate a patch to story runner at the end of the
2007 Dec 21
4
StoryRunner docs/guidance
Hi all, Are there any plans for better documentation for the new StoryRunner feature? I tried to use it today (with Rails), and had a hard time getting my head around whether I was doing it "right" and exactly what things are appropriate to test at that level (this might be exacerbated by the fact that I''ve never really used integration testing that much). A full example of
2007 Sep 26
0
[Story] passing a file using post
...'m trying to run a story for sample caboose that I created. I haven''t changed any of the sample application code. When I try to do the following: When "creating a new asset named", File.open(''/Users/multimedia/desktop/sample/assets/bridge.jpg'') do |path| post_via_redirect "/users/#{@user.login}/assets", :asset => { :uploaded_data => path } end Processing UserAssetsController#create (for 127.0.0.1 at 2007-09-26 14:49:10) [POST] Session ID: d7b173a79b7f1382dc3b037c73608233 Parameters: {"action"=>"create", "controller&qu...
2013 Jun 24
0
wrong number of arguments calling `request` (0 for 1) (ArgumentError)
...And fills in Password with: amitpandya And clicks the Login button Then amitpandya should be logged in And page should include a notice with text: Welcome amitpandya And amitpandya should see the home mypage page now in steps file When "$person logs in" do |user| post_via_redirect "/users/login", {:authenticator => {:username => user, :password => "washington"}},{:https => ''on''} request.should_not be_ssl request.session[:user_id].should == Person.find_by_username(user).id end working fine with cucumber-0.10.0 and cucumb...
2007 Jan 26
0
Problems with assert_select in integration tests
...;a[href*=#{destination}]", link_text get destination assert_response :success end def click_button(button_text, destination, params={}) assert_select "form[action=#{destination}]" do assert_select "input[type=submit][value=#{button_text}]" end post_via_redirect destination, params assert_response :success end end Here is the failure report: 1) Failure: test_personal_account_creation(AccountCreationTest) [/Users/nielsene/ruby-work/compinabox/config/../vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb:281:in `assert_se...
2007 Oct 02
6
color output?
does story runner have commandline options ,eg to add color to output?