Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard committed Dec 12, 2024
1 parent fd29af9 commit 4289e5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@ final class IntegrationTests: XCTestCase {
let image = try XCTUnwrap(response.images.first)
XCTAssertEqual(image.mimeType, "image/jpeg")
XCTAssertGreaterThan(image.data.count, 0)
let imagenImage = image.imagenImage
XCTAssertEqual(imagenImage.mimeType, image.mimeType)
XCTAssertEqual(imagenImage.bytesBase64Encoded, image.data.base64EncodedString())
XCTAssertNil(imagenImage.gcsURI)
#if canImport(UIKit)
let uiImage = try XCTUnwrap(UIImage(data: image.data))
XCTAssertEqual(uiImage.size.width, 1408.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ final class ImagenFileDataImageTests: XCTestCase {

XCTAssertEqual(image.mimeType, mimeType)
XCTAssertEqual(image.gcsURI, gcsURI)
XCTAssertEqual(image.imagenImage.mimeType, mimeType)
XCTAssertEqual(image.imagenImage.gcsURI, gcsURI)
XCTAssertNil(image.imagenImage.bytesBase64Encoded)
XCTAssertEqual(image._imagenImage.mimeType, mimeType)
XCTAssertEqual(image._imagenImage.gcsURI, gcsURI)
XCTAssertNil(image._imagenImage.bytesBase64Encoded)
}

func testDecodeImage_missingGCSURI_throws() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ final class ImagenInlineDataImageTests: XCTestCase {

XCTAssertEqual(image.mimeType, mimeType)
XCTAssertEqual(image.data.base64EncodedString(), bytesBase64Encoded)
XCTAssertEqual(image.imagenImage.mimeType, mimeType)
XCTAssertEqual(image.imagenImage.bytesBase64Encoded, bytesBase64Encoded)
XCTAssertNil(image.imagenImage.gcsURI)
XCTAssertEqual(image._imagenImage.mimeType, mimeType)
XCTAssertEqual(image._imagenImage.bytesBase64Encoded, bytesBase64Encoded)
XCTAssertNil(image._imagenImage.gcsURI)
}

func testDecodeImage_missingBytesBase64Encoded_throws() throws {
Expand Down

0 comments on commit 4289e5f

Please sign in to comment.