Sha256: fa71c3b3c505eb16a57b7d23d4d2e24b1c2b9fd385d1dacaf0d1e869daf73d84

Contents?: true

Size: 983 Bytes

Versions: 20

Compression:

Stored size: 983 Bytes

Contents

require 'test_helper'

class UsersControllerTest < ActionController::TestCase
  setup do
    @user = users(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:users)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create user" do
    assert_difference('User.count') do
      post :create, user: { name: @user.name }
    end

    assert_redirected_to user_path(assigns(:user))
  end

  test "should show user" do
    get :show, id: @user
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @user
    assert_response :success
  end

  test "should update user" do
    patch :update, id: @user, user: { name: @user.name }
    assert_redirected_to user_path(assigns(:user))
  end

  test "should destroy user" do
    assert_difference('User.count', -1) do
      delete :destroy, id: @user
    end

    assert_redirected_to users_path
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
bootstrap_toolbelt-0.1.00 test/dummy/test/controllers/users_controller_test.rb
tasks_management-0.1.4 test/dummy/test/controllers/users_controller_test.rb
tasks_management-0.1.3 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.11 test/dummy/test/controllers/users_controller_test.rb
tasks_management-0.1.2 test/dummy/test/controllers/users_controller_test.rb
activeform-rails-0.0.5 spec/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.10 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.9 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.8 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.7 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.6 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.5 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.4 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.3 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.2 test/dummy/test/controllers/users_controller_test.rb
bootstrap_toolbelt-0.0.1 test/dummy/test/controllers/users_controller_test.rb
activeform-rails-0.0.4 spec/dummy/test/controllers/users_controller_test.rb
activeform-rails-0.0.3 spec/dummy/test/controllers/users_controller_test.rb
activeform-rails-0.0.2 spec/dummy/test/controllers/users_controller_test.rb
activeform-rails-0.0.1 spec/dummy/test/controllers/users_controller_test.rb