Skip to content

Commit 6628d4d

Browse files
authored
Update Mocks (#60)
* Update `FlareMock` * Update `CHANGELOG.md`
1 parent d2b764a commit 6628d4d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file.
1010
## Updated
1111
- Update `codecov` version
1212
- Updated in Pull Request [#59](https://github.com/space-code/flare/pull/59)
13+
- Update mocks
14+
- Updated in Pull Request [#60](https://github.com/space-code/flare/pull/60)
1315

1416
#### 3.x Releases
1517
- `3.0.x` Releases - [`3.0.0`](#300)

Sources/FlareUIMock/Mocks/FlareMock.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,17 @@ public final class FlareMock: IFlare {
257257

258258
public func restore(_: @escaping (Result<Void, any Error>) -> Void) {}
259259

260+
public var invokedReceiptUpdateTransactions = false
261+
public var invokedReceiptUpdateTransactionsCount = 0
262+
public var stubbedReceiptUpdateTransactions = ""
263+
public func receipt(updateTransactions _: Bool) async throws -> String {
264+
invokedReceiptUpdateTransactions = true
265+
invokedReceiptUpdateTransactionsCount += 1
266+
return stubbedReceiptUpdateTransactions
267+
}
268+
269+
public func receipt(updateTransactions _: Bool, completion _: @escaping (Result<String, IAPError>) -> Void) {}
270+
260271
#if os(iOS) || VISION_OS
261272
public var invokedBeginRefundRequest = false
262273
public var invokedBeginRefundRequestCount = 0

0 commit comments

Comments
 (0)