Created
November 7, 2009 00:21
-
-
Save captproton/228410 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'test_helper' | |
| class ShopsControllerTest < ActionController::TestCase | |
| test "should get index" do | |
| get :index | |
| assert_response :success | |
| assert_not_nil assigns(:shops) | |
| end | |
| test "should get new" do | |
| get :new | |
| assert_response :success | |
| end | |
| test "should create shop" do | |
| assert_difference('Shop.count') do | |
| post :create, :shop => { } | |
| end | |
| assert_redirected_to shop_path(assigns(:shop)) | |
| end | |
| test "should show shop" do | |
| get :show, :id => shops(:one).to_param | |
| assert_response :success | |
| end | |
| test "should get edit" do | |
| get :edit, :id => shops(:one).to_param | |
| assert_response :success | |
| end | |
| test "should update shop" do | |
| put :update, :id => shops(:one).to_param, :shop => { } | |
| assert_redirected_to shop_path(assigns(:shop)) | |
| end | |
| test "should destroy shop" do | |
| assert_difference('Shop.count', -1) do | |
| delete :destroy, :id => shops(:one).to_param | |
| end | |
| assert_redirected_to shops_path | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment