root/test/functional/test1s_controller_test.rb @ 1

Revision 1, 1.0 kB (checked in by falcon, 17 years ago)

Version one -> initial work from the laptop.

RevLine 
[1]1require File.dirname(__FILE__) + '/../test_helper'
2
3class Test1sControllerTest < ActionController::TestCase
4  def test_should_get_index
5    get :index
6    assert_response :success
7    assert_not_nil assigns(:test1s)
8  end
9
10  def test_should_get_new
11    get :new
12    assert_response :success
13  end
14
15  def test_should_create_test1
16    assert_difference('Test1.count') do
17      post :create, :test1 => { }
18    end
19
20    assert_redirected_to test1_path(assigns(:test1))
21  end
22
23  def test_should_show_test1
24    get :show, :id => test1s(:one).id
25    assert_response :success
26  end
27
28  def test_should_get_edit
29    get :edit, :id => test1s(:one).id
30    assert_response :success
31  end
32
33  def test_should_update_test1
34    put :update, :id => test1s(:one).id, :test1 => { }
35    assert_redirected_to test1_path(assigns(:test1))
36  end
37
38  def test_should_destroy_test1
39    assert_difference('Test1.count', -1) do
40      delete :destroy, :id => test1s(:one).id
41    end
42
43    assert_redirected_to test1s_path
44  end
45end
Note: See TracBrowser for help on using the browser.