This commit is contained in:
Qiu Yuzhou
2018-09-24 23:54:04 +08:00
parent bc57db4502
commit 84229f5eaa
2 changed files with 29 additions and 10 deletions

View File

@ -111,6 +111,15 @@ class ServerProfileTests: XCTestCase {
XCTAssertEqual(profile?.password, "password")
XCTAssertEqual(profile?.remark, "Prism")
}
func testInitWithLegacyBase64EncodedURLWithTag() {
let url = URL(string: "ss://YmYtY2ZiOnRlc3RAMTkyLjE2OC4xMDAuMTo4ODg4Cg#example-server")!
let profile = ServerProfile(url: url)
XCTAssertNotNil(profile)
XCTAssertEqual(profile?.remark, "example-server")
}
func testInitWithEmptyURL() {
let url = URL(string: "ss://")!