a11yist/test/system/links_test.rb
david 21ab02d647
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s
Links, mainly...
2024-07-26 00:59:00 +02:00

37 lines
866 B
Ruby

require 'application_system_test_case'
class LinksTest < ApplicationSystemTestCase
setup do
@link = links(:one)
end
test 'visiting the index' do
visit links_url
assert_selector 'h1', text: 'Links'
end
test 'should create link' do
visit links_url
click_on 'Link hinzufügen'
select @link.link_category.name, from: 'Kategorie'
fill_in 'Linktext', with: @link.text
fill_in 'Link', with: @link.url
click_on 'Link erstellen'
end
test 'should update Link' do
visit link_url(@link)
click_on 'Link bearbeiten', match: :first
select @link.link_category.name, from: 'Kategorie'
fill_in 'Linktext', with: @link.text
fill_in 'Link', with: @link.url
click_on 'Link aktualisieren'
end
test 'should destroy Link' do
visit link_url(@link)
click_on 'Link löschen', match: :first
end
end