features/httpthumbnailer.feature in httpthumbnailer-0.2.0 vs features/httpthumbnailer.feature in httpthumbnailer-0.3.0
- old
+ new
@@ -61,10 +61,22 @@
Then second part will contain PNG image of size 4x8
And second part mime type will be image/png
Then third part will contain PNG image of size 16x32
And third part mime type will be image/png
+ Scenario: Thumbnails of width or height INPUT will have input image width or height
+ Given test.jpg file content as request body
+ When I do PUT request http://localhost:3100/thumbnail/crop,INPUT,16,JPEG/crop,4,INPUT,PNG/crop,INPUT,INPUT,PNG
+ Then response status will be 200
+ And I will get multipart response
+ Then first part will contain JPEG image of size 509x16
+ And first part mime type will be image/jpeg
+ Then second part will contain PNG image of size 4x719
+ And second part mime type will be image/png
+ Then third part will contain PNG image of size 509x719
+ And third part mime type will be image/png
+
Scenario: Fit thumbnailing method
Given test.jpg file content as request body
When I do PUT request http://localhost:3100/thumbnail/fit,128,128,PNG
Then response status will be 200
And I will get multipart response
@@ -127,27 +139,37 @@
And response body will be CRLF endend lines like
"""
Error: Thumbnailer::UnsupportedMediaTypeError: Magick::ImageMagickError:
"""
+ Scenario: Reporitng of bad thumbanil spec format - bad dimmension value
+ Given test.txt file content as request body
+ When I do PUT request http://localhost:3100/thumbnail/crop,128,bogous,PNG
+ Then response status will be 500
+ And response content type will be text/plain
+ And response body will be CRLF endend lines
+ """
+ Error: ThumbnailSpecs::BadThubnailSpecError::BadDimmensionValueError: bad dimmension value: bogous
+ """
+
Scenario: Reporitng of bad thumbanil spec format - missing param
Given test.txt file content as request body
When I do PUT request http://localhost:3100/thumbnail/crop,128,PNG
Then response status will be 500
And response content type will be text/plain
And response body will be CRLF endend lines
"""
- Error: ThumbnailSpecs::BadThubnailSpecFormat: missing argument in: crop,128,PNG
+ Error: ThumbnailSpecs::BadThubnailSpecError::MissingArgumentError: missing argument in: crop,128,PNG
"""
Scenario: Reporitng of bad thumbanil spec format - bad options format
Given test.txt file content as request body
When I do PUT request http://localhost:3100/thumbnail/crop,128,128,PNG,fas-fda
Then response status will be 500
And response content type will be text/plain
And response body will be CRLF endend lines
"""
- Error: ThumbnailSpecs::BadThubnailSpecFormat: missing option key or value in: fas-fda
+ Error: ThumbnailSpecs::BadThubnailSpecError::MissingOptionKeyOrValueError: missing option key or value in: fas-fda
"""
Scenario: Reporitng of image thumbnailing errors
Given test.jpg file content as request body
When I do PUT request http://localhost:3100/thumbnail/crop,16,16,PNG/crop,0,0,JPG/crop,16,32,JPEG