Added Category and User Passwort Change
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
2026-05-22 02:24:56 +02:00
parent b7f0c35378
commit a706dbe7ff
20 changed files with 472 additions and 69 deletions

View File

@@ -0,0 +1,48 @@
require "test_helper"
class CategoriesControllerTest < ActionDispatch::IntegrationTest
setup do
@category = categories(:one)
end
test "should get index" do
get categories_url
assert_response :success
end
test "should get new" do
get new_category_url
assert_response :success
end
test "should create category" do
assert_difference("Category.count") do
post categories_url, params: { category: {} }
end
assert_redirected_to category_url(Category.last)
end
test "should show category" do
get category_url(@category)
assert_response :success
end
test "should get edit" do
get edit_category_url(@category)
assert_response :success
end
test "should update category" do
patch category_url(@category), params: { category: {} }
assert_redirected_to category_url(@category)
end
test "should destroy category" do
assert_difference("Category.count", -1) do
delete category_url(@category)
end
assert_redirected_to categories_url
end
end