Files
bitchat/bitchatTests/BridgeCaptionTests.swift
Taksh Kothari e64e5be1e1 fix: count bridged people on the rendezvous cell caption (#1810)
The settings line already names the cell. It now adds a plural count when someone is across the bridge, and stays the cell line when nobody is.
2026-11-27 09:39:58 -10:00

18 lines
586 B
Swift

import Testing
@testable import bitchat
struct BridgeCaptionTests {
@Test func noCellKeepsTheEmptyCaption() {
#expect(BridgeSettingsCaption.resolve(hasCell: false, people: 4) == .noCell)
}
@Test func aCellWithNobodyOmitsTheCount() {
#expect(BridgeSettingsCaption.resolve(hasCell: true, people: 0) == .cell)
}
@Test func aCellWithPeopleIncludesTheCount() {
#expect(BridgeSettingsCaption.resolve(hasCell: true, people: 1) == .cellAndPeople)
#expect(BridgeSettingsCaption.resolve(hasCell: true, people: 12) == .cellAndPeople)
}
}