Last active
September 18, 2018 06:45
-
-
Save ktanaka117/5ddf20f0b86cf45c319035077d2e1041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
import KeychainAccess | |
@testable import AwesomeIOSDC | |
class AuthDataStoreTests: XCTestCase { | |
let keychain = Keychain(service: Bundle.main.bundleIdentifier!) // ② | |
func testSaveAccessToken() { | |
let authDataStore = AuthDataStore() // ① | |
authDataStore.save(accessToken: "Congrats iOSDC "2018🎉") // ③, ④, ⑦ | |
let sut = try! keychain.get("AccessToken") // ⑥ | |
XCTAssertEqual("Congrats iOSDC 2018🎉", sut) // ④ | |
// ⑤ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment