Skip to content

Commit

Permalink
Remove all stubs upon tearing down test case
Browse files Browse the repository at this point in the history
  • Loading branch information
crazytonyli committed Feb 16, 2024
1 parent a65b40b commit c44bb13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WordPressKitTests/SelfHostedPluginManagementClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ class SelfHostedPluginManagementClientTests: XCTestCase {
}
}

override func tearDown() {
super.tearDown()

HTTPStubs.removeAllStubs()
}

func testGetPluginsSuccess() throws {
let response = try fixture(filePath: XCTUnwrap(OHPathForFile("self-hosted-plugins-get.json", type(of: self))), headers: nil)
stub(condition: isHost("wp-site.com") && isPath("/wp-json/wp/v2/plugins")) { _ in
Expand Down

0 comments on commit c44bb13

Please sign in to comment.