diff --git a/Features/Package.swift b/Features/Package.swift index b747feb..6783537 100644 --- a/Features/Package.swift +++ b/Features/Package.swift @@ -56,7 +56,7 @@ let package = Package( .target( name: "Models", dependencies: [ - .product(name: "LocalDate", package: "swift-local-date"), + .product(name: "LocalDate", package: "swift-local-date") ] ), .testTarget( diff --git a/Features/Sources/Models/AstronomyPicture.swift b/Features/Sources/Models/AstronomyPicture.swift index e05401c..0dab2a1 100644 --- a/Features/Sources/Models/AstronomyPicture.swift +++ b/Features/Sources/Models/AstronomyPicture.swift @@ -9,7 +9,7 @@ public struct AstronomyPicture: Equatable, Sendable { public var mediaType: MediaType public var title: String public var url: URL? - + public init( copyright: String? = nil, date: LocalDate? = nil, @@ -27,7 +27,7 @@ public struct AstronomyPicture: Equatable, Sendable { self.title = title self.url = url } - + public init(response: Response) { self.init( copyright: response.copyright, diff --git a/Features/Sources/Models/MediaType.swift b/Features/Sources/Models/MediaType.swift index db51f07..0f4d2a5 100644 --- a/Features/Sources/Models/MediaType.swift +++ b/Features/Sources/Models/MediaType.swift @@ -3,7 +3,7 @@ public enum MediaType: Sendable { case video case other case unknown - + init(string: String) { switch string { case "image": diff --git a/Features/Tests/ModelsTests/AstronomyPictureTests.swift b/Features/Tests/ModelsTests/AstronomyPictureTests.swift index c215cdc..538df50 100644 --- a/Features/Tests/ModelsTests/AstronomyPictureTests.swift +++ b/Features/Tests/ModelsTests/AstronomyPictureTests.swift @@ -17,7 +17,7 @@ struct AstronomyPictureTests { title: "title", url: "https://example.com/url" ) - + let model = AstronomyPicture( copyright: "copyright", date: LocalDate(year: 2024, month: 1, day: 1), @@ -27,7 +27,7 @@ struct AstronomyPictureTests { title: "title", url: URL(string: "https://example.com/url")! ) - + #expect(AstronomyPicture(response: response) == model) } }