a11yist/test/system/projects_test.rb
david 8b4ffb83ec
Some checks failed
/ Run tests (push) Failing after 2m3s
/ Run system tests (push) Failing after 2m17s
/ Build, push and deploy image (push) Has been skipped
Added projects
2024-11-24 22:08:36 +01:00

47 lines
1 KiB
Ruby

require "application_system_test_case"
class ProjectsTest < ApplicationSystemTestCase
setup do
@project = projects(:one)
login_test
end
teardown do
logout
end
test "visiting the index" do
visit projects_url
assert_selector "h1", text: "Projekte"
end
test "should create project" do
visit projects_url
click_on "Projekt hinzufügen"
fill_in "Name", with: @project.name
click_on "Projekt erstellen"
assert_text "Project was successfully created"
click_on "Projekte Liste"
end
test "should update Project" do
visit project_url(@project)
click_on "Projekt bearbeiten", match: :first
fill_in "Name", with: @project.name
click_on "Projekt aktualisieren"
assert_text "Project was successfully updated"
click_on "Projekte Liste"
end
test "should destroy Project" do
empty = Project.create!(name: "empty")
visit project_url(empty)
click_on "Projekt löschen", match: :first
assert_text "Project was successfully destroyed"
end
end