43 lines
959 B
Ruby
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
|