Displaying 20 results from an estimated 1000 matches similar to: "Functional test problem"
2006 Jun 15
5
[Fwd: Functional test problem]
Anyone?
-------- Original Message --------
Subject: Functional test problem
Date: Wed, 14 Jun 2006 19:49:03 +0100
From: Chris T <ctmailinglists@gmail.com>
Reply-To: ctmailinglists@gmail.com
To: rails@lists.rubyonrails.org
Embarrassingly late (apps already well advanced), have decided top get
to grips with testing and am having a week hopefully covering everything
I''ve
2006 May 16
3
Testing How To Question
I''m using the functional test for a method like this:
def test_create
post :create, :phase => ''copynew'', :id => 1
assert_response :success
assert_template ''create''
assert_tag :content => ''New Item''
assert_not_nil @item
end
This posts a request to the create method in the controller. Is there
any way to look
2006 May 04
6
second assert_tag failling in rails integration test
Hi all,
I''m fairly new to rails and ruby, but I''ve come across an interesting
glitch and I''m not sure whether I''ve just got something wrong with my
assumptions or if it really is an error in the underlying framework...
I''ve created a bare-bones set of tests to show you where the problem is.
What follows are the steps I went through to reproduce the
2005 Nov 23
2
functional tests, assert_tag and tables
I''ve run into another functional testing issue. Odds are I''m taking the
wrong approach, so I''m back to this list again in the hopes of finding
the true path.
with assert_tag, I''d like to check the values of various table cells and
ensure that the proper values are placed in the appropriate places. I
written some tests that make good sense to me, and in
2006 Jul 13
10
Problem with flashes staying on between pages
I have a login page that redirects to itself if the login is
incorrect. The browser does:
get login
post login, with wrong username and password
redirect back to login
When the post action redirects back to login it sets a flash telling
the user it failed. So far so good. The problem is that if I get
another page after that, the flash is still there. It only disapears
on the second.
2009 May 18
0
[PATCH server] fixed functional tests after recent controller refactoring and managed node controller fixes.
Signed-off-by: Scott Seago <sseago at redhat.com>
---
src/test/functional/host_controller_test.rb | 41 --------------------
.../functional/managed_node_configuration_test.rb | 14 ++++---
src/test/functional/nic_controller_test.rb | 8 ----
src/test/functional/permission_controller_test.rb | 15 ++++---
src/test/functional/quota_controller_test.rb | 2 +-
2006 Aug 07
1
Testing & xml
Probably dead obvious, but are there any assertions for easing testing
of xml output, both for builder templates (for RSS feed -- something
like a version of assert_tag) and for the new restful stuff.
Couldn''t find anything relevant in the API.
Cheers
Chris
2002 Dec 20
2
Part II Re: read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
try:
library(foreign)
read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use")
instead, hth, Merry Christmas, Bernhard
-----Original Message-----
From: Stephen Arthur [mailto:sarthur67 at yahoo.com]
Sent: 20 December 2002 16:55
To: ripley at stats.ox.ac.uk; rossini at blindglobe.net
Cc: r-help at stat.math.ethz.ch; stvjc at channing.harvard.edu
Subject:
2008 Jan 12
0
Can't test application controller methods in functional tests?
I have two methods in application controller that I want to test from
ForumController:
-----------------------
class ApplicationController < ActionController::Base
...
def logout
session[:username] = nil
session[:admin] = nil
redirect_to(request.request_uri)
end
...
def home
redirect_to(:controller => ''forum'', :action =>
2006 Sep 26
0
some help with functional testing of nested routes
I have the following functional test in test/functional for testing my
products_controller:
require File.dirname(__FILE__) + ''/../test_helper''
require ''products_controller''
# Re-raise errors caught by the controller.
class ProductsController
def rescue_action(e)
raise e
end
end
class ProductsControllerTest < Test::Unit::TestCase
fixtures
2010 Aug 09
0
Exceptions in functional tests (rescue_action_in_public! broken?)
In 2.3, exceptions raised by controllers under functional tests were by
default propagated to the test, but by using rescue_action_in_public! a test
could trigger the production, public behavior and then use assert_response
or similar to test the expected result. This was implemented via
coordination between ActionController::Rescue and
ActionController::TestCase::RaiseActionExceptions.
This
2006 Jul 05
2
How to write get functional test when there is no action by that name
I have following line in route.rb
#event info for an event name
map.connect ''event/:name_url'',:controller => ''home'',:action =>
''event_info''
It causes a URL like http://localhost:3000/event/_jewels_exhibition_ to be
sent to the home controller with action as ''event_info''.
I am trying to test this action. My first
2008 Apr 01
2
Functional Testing - page actions
Pretty simple question, I''ve tried to ajaxify some actions and the first
one I did was a delete -
def delete_job
.....
render :update do |page|
page.remove "job_#{id}"
end
....
end
and in my functional test I call this function via post
def test....
post :delete_job, :id => 1
assert_response :success
......
end
after the assert_response, how do I test that the page
2006 Jun 29
0
@response.body accumulating in functional tests?
I have two functional tests for my user controller:
def test_bad_registration
post :register, :email => "tester1@foo.com"
assert_response :success
assert_not_nil @response.body =~ /^\<error/
assert_nil assigns[''user'']
end
def test_good_registration
@response.body = nil
post :register, :username => "tester",
2007 Jan 11
0
Functional tests with actions that send files
I have a number of actions that use the spreadsheet/excel library to
generate an Excel spreadsheet based on model data and send it to the
user using the send_file method.
For a while, I''ve been testing these methods with assert_response
:success, and then checking the response headers to make sure the file
at least looks like what I should be getting. But it occurred to me
recently that
2000 Jul 13
0
q() again and again and again
Rer's,
Get ready for this intellectual fest!
Linux i686 2.2.14-1mdklinus
R-1.0.1
When I try to q() from my workspace, I get the following responses:
###############################
> q()
Save workspace image? [y/n/c]: y Error: can't save data -- unable to open
./.RData
then:
> save.image()
Error in save(list, file, ascii, oldstyle) :
unable to open file
and finally:
2007 Mar 22
1
Functional test and flash with an error
I''m getting this error thats moaning about expected tag, but no tag
found matching {:content=>"User James Apps was successfully created.",
:attributes=>{:id=>"notice"}, :tag=>"div"} in the file application.rb.
I tried using a regular expression - /#{user.first_name}/ , but that
wouldn''t work either
user_controller_test.rb
1) Failure:
2006 May 05
3
posting xml in functional test
Hello,
I''m trying to write a functional test for a simple CRUD controller which
accepts / emits xml in a REST- like fashion. However the following code
won''t work for me - an exception is generated
def test_create
post :create, ''<person><name>john</name></person>'',
2006 Aug 02
1
REST and functional tests
Just playing around with converting an apps to the new REST goodness in
edge rails, and I''m trying to work out how to convert/write the
functional tests.
Is the recommended way to explicitly use the actions (e.g. get :show,
:id => ...; post :create,..., etc) and test the routes separately, or
duplicate the request, in which case how is that done get "/", :id => 5
2006 Feb 18
1
Should assert_tag be used to test rxml views?
I''m getting strange errors attempting to test an rxml view with
assert_tag. I can see that what the view is producing is correct but I
get an error like "ignoring attempt to close foo with bar" (where bar is
a tag which is meant to be nested in foo). Is asssert_tag meant for xml,
or just html?
Cheers, Robert.
--
Posted via http://www.ruby-forum.com/.