2022-05-11 08:26:39 -07:00
|
|
|
//
|
2022-05-13 09:29:57 -07:00
|
|
|
// TransactionAddressTextFieldTests.swift
|
2022-05-11 08:26:39 -07:00
|
|
|
// secantTests
|
|
|
|
//
|
|
|
|
// Created by Lukáš Korba on 06.05.2022.
|
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
@testable import secant_testnet
|
|
|
|
import ComposableArchitecture
|
|
|
|
|
2022-05-13 09:29:57 -07:00
|
|
|
class TransactionAddressTextFieldTests: XCTestCase {
|
2022-05-11 08:26:39 -07:00
|
|
|
func testClearValue() throws {
|
|
|
|
let store = TestStore(
|
|
|
|
initialState:
|
2022-11-07 02:53:20 -08:00
|
|
|
TransactionAddressTextFieldReducer.State(
|
2022-05-11 08:26:39 -07:00
|
|
|
textFieldState:
|
2022-11-05 08:47:11 -07:00
|
|
|
TCATextFieldReducer.State(
|
2022-05-11 08:26:39 -07:00
|
|
|
validationType: nil,
|
2023-02-13 11:32:50 -08:00
|
|
|
text: "t1gXqfSSQt6WfpwyuCU3Wi7sSVZ66DYQ3Po".redacted
|
2022-05-11 08:26:39 -07:00
|
|
|
)
|
|
|
|
),
|
2022-11-07 02:53:20 -08:00
|
|
|
reducer: TransactionAddressTextFieldReducer()
|
2022-05-11 08:26:39 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
store.send(.clearAddress) { state in
|
2023-02-13 11:32:50 -08:00
|
|
|
state.textFieldState.text = "".redacted
|
2022-05-11 08:26:39 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|