48 lines
1.3 KiB
Ruby
48 lines
1.3 KiB
Ruby
require "test_helper"
|
|
|
|
class WheelOptionsControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
@wheel_option = wheel_options(:one)
|
|
end
|
|
|
|
test "should get index" do
|
|
get wheel_options_url
|
|
assert_response :success
|
|
end
|
|
|
|
test "should get new" do
|
|
get new_wheel_option_url
|
|
assert_response :success
|
|
end
|
|
|
|
test "should create wheel_option" do
|
|
assert_difference("WheelOption.count") do
|
|
post wheel_options_url, params: { wheel_option: { batch_id: @wheel_option.batch_id, wheel_id: @wheel_option.wheel_id } }
|
|
end
|
|
|
|
assert_redirected_to wheel_option_url(WheelOption.last)
|
|
end
|
|
|
|
test "should show wheel_option" do
|
|
get wheel_option_url(@wheel_option)
|
|
assert_response :success
|
|
end
|
|
|
|
test "should get edit" do
|
|
get edit_wheel_option_url(@wheel_option)
|
|
assert_response :success
|
|
end
|
|
|
|
test "should update wheel_option" do
|
|
patch wheel_option_url(@wheel_option), params: { wheel_option: { batch_id: @wheel_option.batch_id, wheel_id: @wheel_option.wheel_id } }
|
|
assert_redirected_to wheel_option_url(@wheel_option)
|
|
end
|
|
|
|
test "should destroy wheel_option" do
|
|
assert_difference("WheelOption.count", -1) do
|
|
delete wheel_option_url(@wheel_option)
|
|
end
|
|
|
|
assert_redirected_to wheel_options_url
|
|
end
|
|
end
|