mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-11-29 08:29:22 +00:00
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.
18 lines
586 B
Swift
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)
|
|
}
|
|
}
|