Sha256: e4d22846378c23eae082781091b31700702b22239e565c43e195f68087d1de8f

Contents?: true

Size: 969 Bytes

Versions: 31

Compression:

Stored size: 969 Bytes

Contents

require 'test_helper'

class RolesControllerTest < ActionDispatch::IntegrationTest
  setup do
    @role = roles(:one)
  end

  test "should get index" do
    get roles_url
    assert_response :success
  end

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

  test "should create role" do
    assert_difference('Role.count') do
      post roles_url, params: { role: { name: @role.name } }
    end

    assert_redirected_to role_url(Role.last)
  end

  test "should show role" do
    get role_url(@role)
    assert_response :success
  end

  test "should get edit" do
    get edit_role_url(@role)
    assert_response :success
  end

  test "should update role" do
    patch role_url(@role), params: { role: { name: @role.name } }
    assert_redirected_to role_url(@role)
  end

  test "should destroy role" do
    assert_difference('Role.count', -1) do
      delete role_url(@role)
    end

    assert_redirected_to roles_url
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
keppler-2.1.22 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.21 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.20 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.19 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.18 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.17 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.16 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.15 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.14 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.13 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.12 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.11 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.10 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.9 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.8 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.7 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.6 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.5 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.4 installer/core/test/controllers/roles_controller_test.rb
keppler-2.1.3 installer/core/test/controllers/roles_controller_test.rb