From 2bce3493dc27e5a92a3e01f89a46188022922241 Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Wed, 26 Apr 2023 20:00:18 +0530 Subject: [PATCH 1/3] Added a testcase for imageCoderInfo() testcase --- tests/Imagecoderinfo.cfc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/Imagecoderinfo.cfc diff --git a/tests/Imagecoderinfo.cfc b/tests/Imagecoderinfo.cfc new file mode 100644 index 0000000..6097a74 --- /dev/null +++ b/tests/Imagecoderinfo.cfc @@ -0,0 +1,14 @@ +component extends="org.lucee.cfml.test.LuceeTestCase" { + function run( testResults , testBox ) { + describe( "testcase for imagecoderinfo()", function() { + it(title = "Checking with imageCoderInfo()", body = function( currentSpec ) { + var img = "https://avatars1.githubusercontent.com/u/10973141?s=280&v=4"; + expect(imageCoderInfo(img)).toHaveKey("read"); + expect(imageCoderInfo(img)).toHaveKey("write"); + expect(imageCoderInfo(img).read[1].image).toHaveKey("colormodel"); + expect(imageCoderInfo(img).read[1].image).toHaveKey("metadata"); + expect(imageCoderInfo(img).read[1].image.height).toBe("280"); + }); + }); + } +} \ No newline at end of file From 0575ef8f4de6d7c4429138269f138da8a388604e Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Thu, 27 Apr 2023 19:00:17 +0530 Subject: [PATCH 2/3] updated a test --- tests/Imagecoderinfo.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Imagecoderinfo.cfc b/tests/Imagecoderinfo.cfc index 6097a74..80b79bc 100644 --- a/tests/Imagecoderinfo.cfc +++ b/tests/Imagecoderinfo.cfc @@ -2,12 +2,12 @@ component extends="org.lucee.cfml.test.LuceeTestCase" { function run( testResults , testBox ) { describe( "testcase for imagecoderinfo()", function() { it(title = "Checking with imageCoderInfo()", body = function( currentSpec ) { - var img = "https://avatars1.githubusercontent.com/u/10973141?s=280&v=4"; + var img = 'https://opencollective.com/Lucee/backers.svg'; expect(imageCoderInfo(img)).toHaveKey("read"); expect(imageCoderInfo(img)).toHaveKey("write"); expect(imageCoderInfo(img).read[1].image).toHaveKey("colormodel"); expect(imageCoderInfo(img).read[1].image).toHaveKey("metadata"); - expect(imageCoderInfo(img).read[1].image.height).toBe("280"); + expect(imageCoderInfo(img).read[1].image.height).toBe("163"); }); }); } From 2a6f5422e7a4f17885d48a8f84180761392a1a0e Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Thu, 27 Apr 2023 19:41:06 +0530 Subject: [PATCH 3/3] updated a test --- tests/Imagecoderinfo.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Imagecoderinfo.cfc b/tests/Imagecoderinfo.cfc index 80b79bc..8b012b1 100644 --- a/tests/Imagecoderinfo.cfc +++ b/tests/Imagecoderinfo.cfc @@ -2,12 +2,12 @@ component extends="org.lucee.cfml.test.LuceeTestCase" { function run( testResults , testBox ) { describe( "testcase for imagecoderinfo()", function() { it(title = "Checking with imageCoderInfo()", body = function( currentSpec ) { - var img = 'https://opencollective.com/Lucee/backers.svg'; + var img = 'https://raw.githubusercontent.com/lucee/Lucee/6.0/test/functions/images/lucee.png'; expect(imageCoderInfo(img)).toHaveKey("read"); expect(imageCoderInfo(img)).toHaveKey("write"); expect(imageCoderInfo(img).read[1].image).toHaveKey("colormodel"); expect(imageCoderInfo(img).read[1].image).toHaveKey("metadata"); - expect(imageCoderInfo(img).read[1].image.height).toBe("163"); + expect(imageCoderInfo(img).read[1].image.height).toBe("130"); }); }); }