Skip to content

Commit 9ee2c4d

Browse files
staskusjoshheald
andauthored
Update given-when-then structure
Co-authored-by: Josh Heald <[email protected]>
1 parent 64677fe commit 9ee2c4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Modules/Tests/PointOfSaleTests/Models/PointOfSaleAggregateModelTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,11 @@ struct PointOfSaleAggregateModelTests {
614614
continuation.resume()
615615
}
616616

617-
// Collect payment should only be called once the card reader is connect
617+
// When: the card reader connects
618618
cardPresentPaymentService.connectedReader = .init(name: "Test reader", batteryLevel: 0.7)
619619
}
620620

621+
// Then
621622
#expect(cardPresentPaymentService.collectPaymentWasCalled == true)
622623
}
623624

@@ -675,10 +676,11 @@ struct PointOfSaleAggregateModelTests {
675676
continuation.resume()
676677
}
677678

678-
// Collect payment should be called once the card reader is reconnected
679+
// When: the card reader is reconnected
679680
cardPresentPaymentService.connectedReader = .init(name: "Test reader", batteryLevel: 0.7)
680681
}
681682

683+
// Then
682684
#expect(cardPresentPaymentService.collectPaymentWasCalled == true)
683685
}
684686

0 commit comments

Comments
 (0)