left4me/rails/test/system/wheel_options_test.rb
mwiegand 5ab99c7779
wip
2022-11-27 17:32:21 +01:00

43 lines
1.1 KiB
Ruby

require "application_system_test_case"
class WheelOptionsTest < ApplicationSystemTestCase
setup do
@wheel_option = wheel_options(:one)
end
test "visiting the index" do
visit wheel_options_url
assert_selector "h1", text: "Wheel options"
end
test "should create wheel option" do
visit wheel_options_url
click_on "New wheel option"
fill_in "Batch", with: @wheel_option.batch_id
fill_in "Wheel", with: @wheel_option.wheel_id
click_on "Create Wheel option"
assert_text "Wheel option was successfully created"
click_on "Back"
end
test "should update Wheel option" do
visit wheel_option_url(@wheel_option)
click_on "Edit this wheel option", match: :first
fill_in "Batch", with: @wheel_option.batch_id
fill_in "Wheel", with: @wheel_option.wheel_id
click_on "Update Wheel option"
assert_text "Wheel option was successfully updated"
click_on "Back"
end
test "should destroy Wheel option" do
visit wheel_option_url(@wheel_option)
click_on "Destroy this wheel option", match: :first
assert_text "Wheel option was successfully destroyed"
end
end