Sha256: 59734470d58ccaa6d4f9ff08e0a3fb1fc5c41f55de59072ce648690cd5097884
Contents?: true
Size: 1.28 KB
Versions: 9
Compression:
Stored size: 1.28 KB
Contents
require "test_helper" class Admin::UsersControllerTest < ActionDispatch::IntegrationTest setup do @admin_user = admin_sign_in_as(admin_users(:lazaro_nixon)) end test "should get index" do get admin_users_url assert_response :success end test "should get new" do get new_admin_user_url assert_response :success end test "should create admin_user" do assert_difference("AdminUser.count") do post admin_users_url, params: { admin_user: { email: "lazaronixon@hey.com", password: "Secret1*3*5*", password_confirmation: "Secret1*3*5*"} } end assert_redirected_to admin_user_url(AdminUser.last) end test "should show admin_user" do get admin_user_url(@admin_user) assert_response :success end test "should get edit" do get edit_admin_user_url(@admin_user) assert_response :success end test "should update admin_user" do patch admin_user_url(@admin_user), params: { admin_user: { email: @admin_user.email, password: "NewSecret1*3*5*", password_confirmation: "NewSecret1*3*5*" } } assert_redirected_to admin_user_url(@admin_user) end test "should destroy admin_user" do assert_difference("AdminUser.count", -1) do delete admin_user_url(@admin_user) end assert_redirected_to admin_users_url end end
Version data entries
9 entries across 9 versions & 1 rubygems