37 lines
1.1 KiB
Swift
37 lines
1.1 KiB
Swift
|
|
//
|
||
|
|
// PasswordStoreTest.swift
|
||
|
|
// passKitTests
|
||
|
|
//
|
||
|
|
// Copyright © 2020 Bob Sun. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
import Foundation
|
||
|
|
import XCTest
|
||
|
|
import ObjectiveGit
|
||
|
|
|
||
|
|
@testable import passKit
|
||
|
|
|
||
|
|
class PasswordStoreTest: XCTestCase {
|
||
|
|
// let cloneOptions: [String : GTCredentialProvider] = {
|
||
|
|
// let credentialProvider = GTCredentialProvider { (_, _, _) -> (GTCredential?) in
|
||
|
|
// try? GTCredential(userName: "", password: "")
|
||
|
|
// }
|
||
|
|
// return [GTRepositoryCloneOptionsCredentialProvider: credentialProvider]
|
||
|
|
// }()
|
||
|
|
// let remoteRepoURL = URL(string: "git://localhost/")!
|
||
|
|
//
|
||
|
|
// func testClone() throws {
|
||
|
|
// let url = URL(fileURLWithPath: "\(Globals.repositoryPath)-test")
|
||
|
|
// let passwordStore = PasswordStore(url: url)
|
||
|
|
//
|
||
|
|
// try passwordStore.cloneRepository(
|
||
|
|
// remoteRepoURL: remoteRepoURL,
|
||
|
|
// options: cloneOptions,
|
||
|
|
// branchName: "master",
|
||
|
|
// transferProgressBlock: { _, _ in },
|
||
|
|
// checkoutProgressBlock: { _, _, _ in }
|
||
|
|
// )
|
||
|
|
// passwordStore.erase()
|
||
|
|
// }
|
||
|
|
}
|