Rename test images
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 4 Jun 2017 10:22:05 +0000 (12:22 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 4 Jun 2017 10:22:05 +0000 (12:22 +0200)
src/test/kotlin/net/pterodactylus/sone/web/pages/UploadImagePageTest.kt
src/test/resources/net/pterodactylus/sone/web/pages/image.png [deleted file]
src/test/resources/net/pterodactylus/sone/web/pages/no-image.png [deleted file]
src/test/resources/net/pterodactylus/sone/web/pages/upload-image-invalid-image.png [new file with mode: 0644]
src/test/resources/net/pterodactylus/sone/web/pages/upload-image-value-image.png [new file with mode: 0644]

index dfb9aca..6d41b3f 100644 (file)
@@ -67,7 +67,7 @@ class UploadImagePageTest : WebPageTest() {
                addAlbum("parent-id", parentAlbum)
                addHttpRequestPart("parent", "parent-id")
                addHttpRequestPart("title", "title")
-               addUploadedFile("image", "image.png", "image/png", "no-image.png")
+               addUploadedFile("image", "image.png", "image/png", "upload-image-invalid-image.png")
                verifyNoRedirect {
                        verify(core, never()).createTemporaryImage(any(), any())
                        assertThat(templateContext["messages"] as String?, equalTo<String>("Page.UploadImage.Error.InvalidImage"))
@@ -81,7 +81,7 @@ class UploadImagePageTest : WebPageTest() {
                addHttpRequestPart("parent", "parent-id")
                addHttpRequestPart("title", "Title")
                addHttpRequestPart("description", "Description")
-               addUploadedFile("image", "image.png", "image/png", "image.png")
+               addUploadedFile("image", "upload-image-value-image.png", "image/png", "upload-image-value-image.png")
                val temporaryImage = TemporaryImage("temp-image")
                val imageModifier = mockBuilder<Modifier>()
                val image = mock<Image>().apply {
diff --git a/src/test/resources/net/pterodactylus/sone/web/pages/image.png b/src/test/resources/net/pterodactylus/sone/web/pages/image.png
deleted file mode 100644 (file)
index 6daa837..0000000
Binary files a/src/test/resources/net/pterodactylus/sone/web/pages/image.png and /dev/null differ
diff --git a/src/test/resources/net/pterodactylus/sone/web/pages/no-image.png b/src/test/resources/net/pterodactylus/sone/web/pages/no-image.png
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/test/resources/net/pterodactylus/sone/web/pages/upload-image-invalid-image.png b/src/test/resources/net/pterodactylus/sone/web/pages/upload-image-invalid-image.png
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/test/resources/net/pterodactylus/sone/web/pages/upload-image-value-image.png b/src/test/resources/net/pterodactylus/sone/web/pages/upload-image-value-image.png
new file mode 100644 (file)
index 0000000..6daa837
Binary files /dev/null and b/src/test/resources/net/pterodactylus/sone/web/pages/upload-image-value-image.png differ