Links, mainly...
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

This commit is contained in:
david 2024-07-26 00:59:00 +02:00
parent fd42a3f173
commit 21ab02d647
69 changed files with 2258 additions and 155 deletions

37
test/system/links_test.rb Normal file
View file

@ -0,0 +1,37 @@
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