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

45 lines
1.1 KiB
Ruby

require "application_system_test_case"
class KeyBindsTest < ApplicationSystemTestCase
setup do
@key_bind = key_binds(:one)
end
test "visiting the index" do
visit key_binds_url
assert_selector "h1", text: "Key binds"
end
test "should create key bind" do
visit key_binds_url
click_on "New key bind"
fill_in "Batch", with: @key_bind.batch_id
fill_in "Key", with: @key_bind.key_id
fill_in "Setup", with: @key_bind.setup_id
click_on "Create Key bind"
assert_text "Key bind was successfully created"
click_on "Back"
end
test "should update Key bind" do
visit key_bind_url(@key_bind)
click_on "Edit this key bind", match: :first
fill_in "Batch", with: @key_bind.batch_id
fill_in "Key", with: @key_bind.key_id
fill_in "Setup", with: @key_bind.setup_id
click_on "Update Key bind"
assert_text "Key bind was successfully updated"
click_on "Back"
end
test "should destroy Key bind" do
visit key_bind_url(@key_bind)
click_on "Destroy this key bind", match: :first
assert_text "Key bind was successfully destroyed"
end
end