SPB Git

Repository Public

SmokeTests.swift 597 B 14 lines swift

1import XCTest2@testable import SPVault34final class SmokeTests: XCTestCase {5    func testInviteTokenParsing() async {6        let token = "abcDEF012345_-abcDEF0123"7        let a = await AppModel.inviteToken(from: "https://vault.spboucher.ai/#/join/\(token)")8        let b = await AppModel.inviteToken(from: "  \(token)\n")9        let c = await AppModel.inviteToken(from: "spvault://join/\(token)")10        let d = await AppModel.inviteToken(from: "https://evil.example/?x=<script>")11        XCTAssertEqual(a, token); XCTAssertEqual(b, token); XCTAssertEqual(c, token); XCTAssertNil(d)12    }13}14
Files main
Menu

Theme