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

43 lines
959 B
Ruby

require "application_system_test_case"
class WheelsTest < ApplicationSystemTestCase
setup do
@wheel = wheels(:one)
end
test "visiting the index" do
visit wheels_url
assert_selector "h1", text: "Wheels"
end
test "should create wheel" do
visit wheels_url
click_on "New wheel"
fill_in "Name", with: @wheel.name
fill_in "Setup", with: @wheel.setup_id
click_on "Create Wheel"
assert_text "Wheel was successfully created"
click_on "Back"
end
test "should update Wheel" do
visit wheel_url(@wheel)
click_on "Edit this wheel", match: :first
fill_in "Name", with: @wheel.name
fill_in "Setup", with: @wheel.setup_id
click_on "Update Wheel"
assert_text "Wheel was successfully updated"
click_on "Back"
end
test "should destroy Wheel" do
visit wheel_url(@wheel)
click_on "Destroy this wheel", match: :first
assert_text "Wheel was successfully destroyed"
end
end