diff options
Diffstat (limited to 'test/functional/pages_controller_test.rb')
| -rw-r--r-- | test/functional/pages_controller_test.rb | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/test/functional/pages_controller_test.rb b/test/functional/pages_controller_test.rb index 97ca1b6..3879014 100644 --- a/test/functional/pages_controller_test.rb +++ b/test/functional/pages_controller_test.rb | |||
| @@ -1,45 +1,5 @@ | |||
| 1 | require 'test_helper' | 1 | require 'test_helper' |
| 2 | 2 | ||
| 3 | class PagesControllerTest < ActionController::TestCase | 3 | class PagesControllerTest < ActionController::TestCase |
| 4 | test "should get index" do | 4 | # will be removed anyway |
| 5 | get :index | ||
| 6 | assert_response :success | ||
| 7 | assert_not_nil assigns(:pages) | ||
| 8 | end | ||
| 9 | |||
| 10 | test "should get new" do | ||
| 11 | get :new | ||
| 12 | assert_response :success | ||
| 13 | end | ||
| 14 | |||
| 15 | test "should create page" do | ||
| 16 | assert_difference('Page.count') do | ||
| 17 | post :create, :page => { } | ||
| 18 | end | ||
| 19 | |||
| 20 | assert_redirected_to page_path(assigns(:page)) | ||
| 21 | end | ||
| 22 | |||
| 23 | test "should show page" do | ||
| 24 | get :show, :id => pages(:one).id | ||
| 25 | assert_response :success | ||
| 26 | end | ||
| 27 | |||
| 28 | test "should get edit" do | ||
| 29 | get :edit, :id => pages(:one).id | ||
| 30 | assert_response :success | ||
| 31 | end | ||
| 32 | |||
| 33 | test "should update page" do | ||
| 34 | put :update, :id => pages(:one).id, :page => { } | ||
| 35 | assert_redirected_to page_path(assigns(:page)) | ||
| 36 | end | ||
| 37 | |||
| 38 | test "should destroy page" do | ||
| 39 | assert_difference('Page.count', -1) do | ||
| 40 | delete :destroy, :id => pages(:one).id | ||
| 41 | end | ||
| 42 | |||
| 43 | assert_redirected_to pages_path | ||
| 44 | end | ||
| 45 | end | 5 | end |
