forked from kay/RouterOS
.help(...)-Tooltips auf jedem Eingabefeld/Picker/Toggle in Connect- sowie allen Einrichten-Schritten (WAN/LAN/VLAN/WLAN/Firewall) -- kurze Erklärung was der Wert bedeutet und welche Auswirkung er hat, passend zum Laien-Anspruch der App. Sicherungen-Tab: Speicherort jetzt änderbar (Ordner wählen über nativen macOS-Dialog, Zurücksetzen auf Standard). BackupService hält den gewählten Pfad in UserDefaults (BackupService.customDirectoryURL), fällt ohne Auswahl weiter auf ~/Library/Application Support/... zurück. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HReLXMbmPvtQ23p1iWiJNW
21 lines
626 B
Swift
21 lines
626 B
Swift
import XCTest
|
|
@testable import RouterOSAssistant
|
|
|
|
final class BackupServiceTests: XCTestCase {
|
|
override func tearDown() {
|
|
BackupService.customDirectoryURL = nil
|
|
super.tearDown()
|
|
}
|
|
|
|
func testCustomDirectoryDefaultsToNil() {
|
|
BackupService.customDirectoryURL = nil
|
|
XCTAssertNil(BackupService.customDirectoryURL)
|
|
}
|
|
|
|
func testCustomDirectoryRoundTrips() {
|
|
let url = URL(fileURLWithPath: "/tmp/RouterOSAssistantTestBackups", isDirectory: true)
|
|
BackupService.customDirectoryURL = url
|
|
XCTAssertEqual(BackupService.customDirectoryURL?.path, url.path)
|
|
}
|
|
}
|