summaryrefslogtreecommitdiff
path: root/HutchTests/SettingsViewTests.swift
diff options
context:
space:
mode:
Diffstat (limited to 'HutchTests/SettingsViewTests.swift')
-rw-r--r--HutchTests/SettingsViewTests.swift22
1 files changed, 22 insertions, 0 deletions
diff --git a/HutchTests/SettingsViewTests.swift b/HutchTests/SettingsViewTests.swift
new file mode 100644
index 0000000..950c3dc
--- /dev/null
+++ b/HutchTests/SettingsViewTests.swift
@@ -0,0 +1,22 @@
+import Foundation
+import Testing
+@testable import Hutch
+
+struct SettingsViewTests {
+
+ @Test
+ @MainActor
+ func settingsBioAttributedStringPreservesInlineMarkdown() {
+ let attributed = settingsBioAttributedString("Hello **world** and [link](https://example.com)")
+
+ #expect(String(attributed.characters).contains("Hello world and link"))
+ }
+
+ @Test
+ @MainActor
+ func settingsBioAttributedStringFallsBackForInvalidMarkdown() {
+ let attributed = settingsBioAttributedString("[broken")
+
+ #expect(String(attributed.characters) == "[broken")
+ }
+}