35 lines
1.1 KiB
Swift
35 lines
1.1 KiB
Swift
import SwiftUI
|
|
import Testing
|
|
@testable import ManaAuthUI
|
|
|
|
@Suite("ManaBrandConfig")
|
|
struct ManaBrandConfigTests {
|
|
@Test("systemDefault setzt sinnvolle Defaults")
|
|
func systemDefaultDefaults() {
|
|
let config = ManaBrandConfig.systemDefault
|
|
#expect(config.appName == "mana")
|
|
#expect(config.tagline == nil)
|
|
#expect(config.logoSymbol == nil)
|
|
}
|
|
|
|
@Test("Apps können ein eigenes Brand-Config bauen")
|
|
func customConfig() {
|
|
let cardecky = ManaBrandConfig(
|
|
appName: "Cardecky",
|
|
tagline: "Karteikarten des Vereins mana",
|
|
logoSymbol: "rectangle.stack.fill",
|
|
background: .white,
|
|
foreground: .black,
|
|
surface: .gray,
|
|
mutedForeground: .gray,
|
|
border: .gray,
|
|
primary: .green,
|
|
primaryForeground: .white,
|
|
error: .red,
|
|
success: .green
|
|
)
|
|
#expect(cardecky.appName == "Cardecky")
|
|
#expect(cardecky.tagline == "Karteikarten des Vereins mana")
|
|
#expect(cardecky.logoSymbol == "rectangle.stack.fill")
|
|
}
|
|
}
|