Skip to content

Commit

Permalink
Add test cases for when the card scheme is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
okhan-okbay-cko committed Oct 20, 2023
1 parent 8562ac0 commit 0c2e6d3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Tests/UI/SecurityCodeComponent/SecurityCodeComponentTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ final class SecurityCodeComponentTests: XCTestCase {
let sut = SecurityCodeComponent()
var mockconfig = SecurityCodeComponentConfiguration(apiKey: "some_api_key", environment: .sandbox)

func test_whenConfigureIsCalled_thenRequiredPropertiesAreSet() {

}

func test_whenUpdateIsCalledWith_thenISSecurityCodeValidCalledWithCorrectResult() {
let testMatrix: [(scheme: Card.Scheme, securityCode: String, expectedResult: Bool)] = [
let testMatrix: [(scheme: Card.Scheme?, securityCode: String, expectedResult: Bool)] = [
(.visa, "", false),
(.visa, "1", false),
(.visa, "12", false),
Expand All @@ -33,6 +29,11 @@ final class SecurityCodeComponentTests: XCTestCase {
(.unknown, "12", false),
(.unknown, "123", true),
(.unknown, "1234", true),
(nil, "", false),
(nil, "1", false),
(nil, "12", false),
(nil, "123", true),
(nil, "1234", true),
]

testMatrix.forEach { testData in
Expand Down

0 comments on commit 0c2e6d3

Please sign in to comment.