Skip to content

Commit 672b8f3

Browse files
authored
Fix unit tests compiling issues (#708)
1 parent 112eea1 commit 672b8f3

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

native/swift/Tests/wordpress-api/Endpoints/Users.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ struct UsersTests {
4242
apiRootUrl: ParsedUrl.parse(input: "https://wordpress.org/wp-json"),
4343
authenticationProvider: .none(),
4444
executor: stubs,
45-
middlewarePipeline: .default
45+
middlewarePipeline: .default,
46+
appNotifier: nil
4647
)
4748
let user = try await api.users.retrieveWithViewContext(userId: 1)
4849
#expect(user.data.name == "User Name")

native/swift/Tests/wordpress-api/HttpTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class HTTPErrorTests {
1212
apiRootUrl: ParsedUrl.parse(input: "https://wordpress.org/wp-json"),
1313
authenticationProvider: .none(),
1414
executor: stubs,
15-
middlewarePipeline: .default
15+
middlewarePipeline: .default,
16+
appNotifier: nil
1617
)
1718

1819
await #expect(throws: WpApiError.self, performing: {

native/swift/Tests/wordpress-api/WordPressAPITests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ struct WordPressAPITests {
4646
apiRootUrl: ParsedUrl.parse(input: "https://wordpress.org/wp-json"),
4747
authenticationProvider: .none(),
4848
executor: stubs,
49-
middlewarePipeline: .default
49+
middlewarePipeline: .default,
50+
appNotifier: nil
5051
)
5152
let user = try await api.users.retrieveWithViewContext(userId: 1)
5253
#expect(user.data.name == "User Name")
@@ -60,7 +61,8 @@ struct WordPressAPITests {
6061
apiRootUrl: ParsedUrl.parse(input: "https://wordpress.org/wp-json"),
6162
authenticationProvider: .none(),
6263
executor: stubs,
63-
middlewarePipeline: .init(middlewares: [counter])
64+
middlewarePipeline: .init(middlewares: [counter]),
65+
appNotifier: nil
6466
)
6567
_ = try await api.users.retrieveWithViewContext(userId: 1)
6668
await #expect(counter.count == 1)

0 commit comments

Comments
 (0)