Files
todos/UnitTests/Tests/View Models/TaskListViewModelTests.swift
T
javier 2a3323b8e6 List tasks feature (#4)
This PR contains the work done to implement the **List Tasks** feature, and to integrate it into the main content view of the app.

Reviewed-on: rock-n-code/todos-app#4
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2026-02-10 15:31:52 +00:00

28 lines
556 B
Swift

import Foundation
import SwiftData
import Testing
@testable import Todos
@Suite("TaskList view model tests")
struct TaskListViewModelTests {
// MARK: Computed tests
@Test(
"navigationTitle returns correct title for each and every group",
arguments: TodoGroup.allCases
)
func navigationTitle(for group: TodoGroup) {
// GIVEN
let viewModel = TaskListView.ViewModel(group: group)
// WHEN
let title = viewModel.navigationTitle
// THEN
#expect(title == group.title)
}
}