Skip to content

Commit 3182364

Browse files
committed
Add test for simpleProductsInfoButtonTapped
1 parent c35d330 commit 3182364

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

WooCommerce/WooCommerceTests/POS/ViewModels/ItemListViewModelTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ final class ItemListViewModelTests: XCTestCase {
310310
XCTAssertEqual(receivedItems.first?.productID, firstItem.productID)
311311
XCTAssertEqual(receivedItems.last?.productID, lastItem.productID)
312312
}
313+
314+
func test_simpleProductsInfoButtonTapped_when_tapped_then_showSimpleProductsModal_toggled() {
315+
XCTAssertFalse(sut.showSimpleProductsModal)
316+
317+
sut.simpleProductsInfoButtonTapped()
318+
319+
XCTAssertTrue(sut.showSimpleProductsModal)
320+
}
313321
}
314322

315323
private extension ItemListViewModelTests {

0 commit comments

Comments
 (0)