search for: test_should_show_index

Displaying 2 results from an estimated 2 matches for "test_should_show_index".

2008 Jul 24
0
Re: Simple functional test fails
...ory (more polite): <%= link_to @story.name, @story.link %></ > p> > <p>Random history: <%= link_to @rand_story.name, @rand_story.link > %></p> > - And finally this is the test: > class StoriesControllerTest < ActionController::TestCase > def test_should_show_index > get :index > assert_response :success > assert_template ''index'' > assert_not_nil assigns(:story) > end > end > > When running "rake test:functionals" it shows an error: "The error > occurred while evaluating nil.link o...
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
...9;test_helper' + +class Cloud::InstanceControllerTest < ActionController::TestCase + fixtures :vms, :tasks + def setup + @controller = Cloud::InstanceController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + def test_should_show_index + get :index + assert_response :success + assert_template 'index' + assert_not_nil assigns(:vms) + assert_not_nil assigns(:user) + end + + def test_should_redirect_if_request_for_selected + post(:index,{:submit_for_list => 'Show Selected'}) + assert_respons...