Sha256: 8e1ae14b11b54be3c0cf1d2c550fa561f86a0cdd2e680d76ad89aea92d7ce488
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
require 'test_helper' module AsUser class UsersControllerTest < ActionController::TestCase =begin 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: { email: @user.email, name: @user.name, password_digest: @user.password_digest } 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 put :update, id: @user, user: { email: @user.email, name: @user.name, password_digest: @user.password_digest } 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
as_user-0.0.2 | test/functional/as_user/users_controller_test.rb |