Files
vault171/test/controllers/rooms_controller_test.rb
David Böhm af10dca289
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
Added Room and some little design updates
2026-05-28 01:04:19 +02:00

49 lines
933 B
Ruby

require "test_helper"
class RoomsControllerTest < ActionDispatch::IntegrationTest
setup do
@room = rooms(:one)
end
test "should get index" do
get rooms_url
assert_response :success
end
test "should get new" do
get new_room_url
assert_response :success
end
test "should create room" do
assert_difference("Room.count") do
post rooms_url, params: { room: {} }
end
assert_redirected_to room_url(Room.last)
end
test "should show room" do
get room_url(@room)
assert_response :success
end
test "should get edit" do
get edit_room_url(@room)
assert_response :success
end
test "should update room" do
patch room_url(@room), params: { room: {} }
assert_redirected_to room_url(@room)
end
test "should destroy room" do
assert_difference("Room.count", -1) do
delete room_url(@room)
end
assert_redirected_to rooms_url
end
end