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