A lot :)
This commit is contained in:
parent
aad67af0d1
commit
63fc206c27
153 changed files with 2043 additions and 646 deletions
|
|
@ -1,37 +1,39 @@
|
|||
require 'application_system_test_case'
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "application_system_test_case"
|
||||
|
||||
class LinksTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@link = links(:one)
|
||||
end
|
||||
|
||||
test 'visiting the index' do
|
||||
test "visiting the index" do
|
||||
visit links_url
|
||||
assert_selector 'h1', text: 'Links'
|
||||
assert_selector "h1", text: "Links"
|
||||
end
|
||||
|
||||
test 'should create link' do
|
||||
test "should create link" do
|
||||
visit links_url
|
||||
click_on 'Link hinzufügen'
|
||||
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'
|
||||
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
|
||||
test "should update Link" do
|
||||
visit link_url(@link)
|
||||
click_on 'Link bearbeiten', match: :first
|
||||
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'
|
||||
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
|
||||
test "should destroy Link" do
|
||||
visit link_url(@link)
|
||||
click_on 'Link löschen', match: :first
|
||||
click_on "Link löschen", match: :first
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue