diff --git a/LeStorage/ApiCallCollection.swift b/LeStorage/ApiCallCollection.swift index fdab25d..f87d2c0 100644 --- a/LeStorage/ApiCallCollection.swift +++ b/LeStorage/ApiCallCollection.swift @@ -230,8 +230,7 @@ actor ApiCallCollection: SomeCallCollection { case (.post, .put): call = try self._createCall(instance, method: .post) case (.post, .delete): - self._deleteCalls(existingCalls) - return nil + call = try self._createCall(instance, method: .delete) case (.put, .put): call = try self._createCall(instance, method: .put) case (.put, .delete): diff --git a/LeStorageTests/ApiCallTests.swift b/LeStorageTests/ApiCallTests.swift index 9ee3401..bd5a7eb 100644 --- a/LeStorageTests/ApiCallTests.swift +++ b/LeStorageTests/ApiCallTests.swift @@ -43,7 +43,7 @@ struct ApiCallTests { } let _ = try await collection.sendDeletion(thing) - await #expect(collection.items.count == 0) + await #expect(collection.items.count == 1) } @Test func testApiCallProvisioning2() async throws {