Sha256: 841bc8f975912512b24958d1553282257d0482c41959692441723d359e35be0d

Contents?: true

Size: 1.25 KB

Versions: 12

Compression:

Stored size: 1.25 KB

Contents

require "test_helper"

class Admin::UsersControllerTest < ActionDispatch::IntegrationTest
  setup do
    @user = sign_in_admin_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("Admin::User.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(Admin::User.last)
  end

  test "should show admin_user" do
    get admin_user_url(@user)
    assert_response :success
  end

  test "should get edit" do
    get edit_admin_user_url(@user)
    assert_response :success
  end

  test "should update admin_user" do
    patch admin_user_url(@user), params: { admin_user: { email: @user.email, password: "NewSecret1*3*5*", password_confirmation: "NewSecret1*3*5*" } }
    assert_redirected_to admin_user_url(@user)
  end

  test "should destroy admin_user" do
    assert_difference("Admin::User.count", -1) do
      delete admin_user_url(@user)
    end

    assert_redirected_to admin_users_url
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
administration-zero-1.0.6 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-1.0.5 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-1.0.4 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-1.0.3 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-1.0.2 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-1.0.1 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-1.0.0 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-0.0.18 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-0.0.17 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-0.0.16 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-0.0.15 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb
administration-zero-0.0.14 lib/generators/admin/install/templates/test_unit/controllers/admin/users_controller_test.rb