test: remove View helper tests from ViewModel test file
- statusLabel/formatSeconds belong to MaterialDetailView, not ViewModel Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
833bc70121
commit
203e45df34
@ -145,22 +145,4 @@ final class MaterialDetailViewModelTests: XCTestCase {
|
||||
XCTAssertNil(vm2.readingStatus)
|
||||
}
|
||||
|
||||
// MARK: - statusLabel
|
||||
|
||||
func test_statusLabel() {
|
||||
let view = MaterialDetailView(knowledgeBaseId: "k", fileName: "f", fileType: .markdown, fileSize: 0, filePath: "")
|
||||
XCTAssertEqual(view.statusLabel("completed"), "阅读完成")
|
||||
XCTAssertEqual(view.statusLabel("in_progress"), "阅读中")
|
||||
XCTAssertEqual(view.statusLabel("other"), "已开始")
|
||||
XCTAssertEqual(view.statusLabel(nil), "已开始")
|
||||
}
|
||||
|
||||
// MARK: - formatSeconds
|
||||
|
||||
func test_formatSeconds() {
|
||||
let view = MaterialDetailView(knowledgeBaseId: "k", fileName: "f", fileType: .markdown, fileSize: 0, filePath: "")
|
||||
XCTAssertEqual(view.formatSeconds(30), "30 秒")
|
||||
XCTAssertEqual(view.formatSeconds(120), "2 分钟")
|
||||
XCTAssertEqual(view.formatSeconds(3660), "1 小时 1 分钟")
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user