From 906945a6c5fdc694feb7cf046944356770f224c8 Mon Sep 17 00:00:00 2001 From: Ondrej Rafaj Date: Sun, 20 Dec 2020 14:17:27 +0000 Subject: [PATCH] fixing remaining errors --- .../Response tools/Response+Debug.swift | 6 ++--- .../Services/Services+Testing.swift | 25 ------------------- 2 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 Sources/VaporTestTools/Extensions/Services/Services+Testing.swift diff --git a/Sources/VaporTestTools/Extensions/Response tools/Response+Debug.swift b/Sources/VaporTestTools/Extensions/Response tools/Response+Debug.swift index f12fd67..d834690 100644 --- a/Sources/VaporTestTools/Extensions/Response tools/Response+Debug.swift +++ b/Sources/VaporTestTools/Extensions/Response tools/Response+Debug.swift @@ -6,7 +6,7 @@ // import Foundation -@testable import Vapor +import Vapor extension TestableProperty where TestableType: Response { @@ -20,10 +20,10 @@ extension TestableProperty where TestableType: Response { print("\t\(header.name.description) = \(header.value)") } print("Content:") - if let size = element.content.container.http.body.count { + if let size = element.testable.contentSize { print("\tSize: \(String(size))") } - if let mediaType = element.content.container.http.contentType { + if let mediaType = element.http.contentType { print("\tMedia type: \(mediaType.description)") } if let stringContent = element.testable.contentString { diff --git a/Sources/VaporTestTools/Extensions/Services/Services+Testing.swift b/Sources/VaporTestTools/Extensions/Services/Services+Testing.swift deleted file mode 100644 index af3e800..0000000 --- a/Sources/VaporTestTools/Extensions/Services/Services+Testing.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Services+Testing.swift -// VaporTestTools -// -// Created by Ondrej Rafaj on 20/03/2018. -// - -import Foundation -@testable import Service - - -extension Services { - - /// Remove particular service - public mutating func remove(type: S.Type) { - if let existing = factories.index(where: { - $0.serviceType is S.Type - }) { - factories.remove(at: existing) - } - } - -} - -