TM-SGNL-iOS/SignalServiceKit/tests/TSThreadTests.swift
TeleMessage developers dde0620daf initial commit
2025-05-03 12:28:28 -07:00

18 lines
590 B
Swift

//
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
import SignalServiceKit
import XCTest
final class TSThreadTests: XCTestCase {
func testInitCallsDesignatedInit() throws {
let thread = TSThread()
XCTAssertEqual(thread.conversationColorNameObsolete, "Obsolete")
XCTAssertNil(thread.messageDraft)
let now = Date()
let creationDate = try XCTUnwrap(thread.creationDate)
XCTAssertEqual(creationDate.timeIntervalSinceReferenceDate, now.timeIntervalSinceReferenceDate, accuracy: 0.01 /* 10 ms */)
}
}