Skip to content

Commit

Permalink
Add forced orientation image version tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Jun 19, 2015
1 parent e08becd commit 4f28e9a
Showing 1 changed file with 50 additions and 32 deletions.
82 changes: 50 additions & 32 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ describe('resize()', function() {
maxHeight: 150,
maxWidth: 150,
aspect: "3:2"
},{
suffix: '-horizontal-500',
maxHeight: 500,
maxWidth: 500,
aspect: "3:2!h",
},{
suffix: '-vertical-500',
maxHeight: 500,
maxWidth: 500,
aspect: "3:2!v",
},{
suffix: '-square-200',
maxHeight: 200,
Expand All @@ -279,14 +289,16 @@ describe('resize()', function() {
};

var checksum = {
'assets/horizontal-full.jpg' : '1a97483f4dfc21ea77217731a0f1908f8edeec22',
'assets/horizontal-1200.jpg' : '54f1be17d4ffac0cb23802f1c04e783594662a8a',
'assets/horizontal-800.jpg' : '9ebf00a2d96361720dcbcb66af14689d3d51269f',
'assets/horizontal-500.jpg' : '58b09dc1f4ecf22427cc73ffd7b8ef2194fff4bb',
'assets/horizontal-260.jpg' : '33437a2300f7d991c439d532075e211aad962a78',
'assets/horizontal-150.jpg' : 'ad5957669f0774cd66be76414dcbe6b0d789367d',
'assets/horizontal-square-200.jpg': '576b72b83f486cfc684f459670e912310427a6a5',
'assets/horizontal-square-50.jpg' : 'cc0291eb853ceba62b009626ae7a0e68562e93de'
'assets/horizontal-1200.jpg' : '54f1be17d4ffac0cb23802f1c04e783594662a8a',
'assets/horizontal-150.jpg' : 'ad5957669f0774cd66be76414dcbe6b0d789367d',
'assets/horizontal-260.jpg' : '33437a2300f7d991c439d532075e211aad962a78',
'assets/horizontal-500.jpg' : '58b09dc1f4ecf22427cc73ffd7b8ef2194fff4bb',
'assets/horizontal-800.jpg' : '9ebf00a2d96361720dcbcb66af14689d3d51269f',
'assets/horizontal-full.jpg' : '1a97483f4dfc21ea77217731a0f1908f8edeec22',
'assets/horizontal-horizontal-500.jpg' : '58b09dc1f4ecf22427cc73ffd7b8ef2194fff4bb',
'assets/horizontal-square-200.jpg' : '576b72b83f486cfc684f459670e912310427a6a5',
'assets/horizontal-square-50.jpg' : 'cc0291eb853ceba62b009626ae7a0e68562e93de',
'assets/horizontal-vertical-500.jpg' : '6b5cda8f8b58f49c653a8dc48ae2976c7d079c3d'
};

resize(image, output, function(err, versions) {
Expand Down Expand Up @@ -314,14 +326,16 @@ describe('resize()', function() {
};

var checksum = {
'assets/vertical-full.jpg' : '709746db3a56f66066f846e273db78dee60d0311',
'assets/vertical-1200.jpg' : '6f1f88a98e43377728864a42ad1123126b66c1f7',
'assets/vertical-800.jpg' : '95fbe34e98dd7839b1bde9400f4c7a6784e408b3',
'assets/vertical-500.jpg' : '474242606e782deafe7af976f23513697b622cf4',
'assets/vertical-260.jpg' : '4e49f570413c9f15156b1cf99febe9054e2f294f',
'assets/vertical-150.jpg' : '9d8ec5975d548ee0b2f6f83c5f896c0fcd5d3a88',
'assets/vertical-square-200.jpg': '1d2a9b581b7f989e44384f4eabde1fc5085d20ad',
'assets/vertical-square-50.jpg' : '33e038f5fbcbc92991d68e343733bb0735286243'
'assets/vertical-1200.jpg' : '6f1f88a98e43377728864a42ad1123126b66c1f7',
'assets/vertical-150.jpg' : '9d8ec5975d548ee0b2f6f83c5f896c0fcd5d3a88',
'assets/vertical-260.jpg' : '4e49f570413c9f15156b1cf99febe9054e2f294f',
'assets/vertical-500.jpg' : '474242606e782deafe7af976f23513697b622cf4',
'assets/vertical-800.jpg' : '95fbe34e98dd7839b1bde9400f4c7a6784e408b3',
'assets/vertical-full.jpg' : '709746db3a56f66066f846e273db78dee60d0311',
'assets/vertical-horizontal-500.jpg' : 'a70eff22ec8c4a12ab128560463280eb13edb2be',
'assets/vertical-square-200.jpg' : '1d2a9b581b7f989e44384f4eabde1fc5085d20ad',
'assets/vertical-square-50.jpg' : '33e038f5fbcbc92991d68e343733bb0735286243',
'assets/vertical-vertical-500.jpg' : '474242606e782deafe7af976f23513697b622cf4'
};

resize(image, output, function(err, versions) {
Expand Down Expand Up @@ -357,14 +371,16 @@ describe('resize()', function() {
}

var checksum = {
'assets/transparent-full.jpg' : '78e3647bc9f86f3e0a8a0a25dcc60fba519c29b9',
'assets/transparent-1200.jpg' : '35069de49846815381830b4c46ab90f75eba43aa',
'assets/transparent-800.jpg' : '017ec8afb9a81eae00132105da9cd6ea4083011c',
'assets/transparent-500.jpg' : 'c0705376d473724384e6ed30a1305683023780e9',
'assets/transparent-260.jpg' : '1ccf58141dfa60fe2cc74f024a9df82172e235d4',
'assets/transparent-150.jpg' : 'f46d2e15c618b65d9e082f605e894d5ebd6a5450',
'assets/transparent-square-200.jpg': '012230141cb127947cfe958c452560b7a50d2425',
'assets/transparent-square-50.jpg' : 'ea8a03a6f9acfd1c5170c4b5d382c84aa3b304dc'
'assets/transparent-1200.jpg' : '35069de49846815381830b4c46ab90f75eba43aa',
'assets/transparent-150.jpg' : 'f46d2e15c618b65d9e082f605e894d5ebd6a5450',
'assets/transparent-260.jpg' : '1ccf58141dfa60fe2cc74f024a9df82172e235d4',
'assets/transparent-500.jpg' : 'c0705376d473724384e6ed30a1305683023780e9',
'assets/transparent-800.jpg' : '017ec8afb9a81eae00132105da9cd6ea4083011c',
'assets/transparent-full.jpg' : '78e3647bc9f86f3e0a8a0a25dcc60fba519c29b9',
'assets/transparent-horizontal-500.jpg' : 'c0705376d473724384e6ed30a1305683023780e9',
'assets/transparent-square-200.jpg' : '012230141cb127947cfe958c452560b7a50d2425',
'assets/transparent-square-50.jpg' : 'ea8a03a6f9acfd1c5170c4b5d382c84aa3b304dc',
'assets/transparent-vertical-500.jpg' : '384f876de67f866daca7d675a7b2a4f256c2767e',
};

resize(image, output, function(err, versions) {
Expand Down Expand Up @@ -394,14 +410,16 @@ describe('resize()', function() {
};

var checksum = {
'assets/autorotate-full.jpg' : 'efe10ac17cae71bd28c316728d6d29eeacc11fd8',
'assets/autorotate-1200.jpg' : 'e8f5b75aa6c9859426c1d652d57a053444f897ff',
'assets/autorotate-800.jpg' : '081df1cc1a3d7d76a0762f0d586dbecff221a25c',
'assets/autorotate-500.jpg' : 'c5437d9b2dbbf791931ca9089020c78ac8fd02a3',
'assets/autorotate-260.jpg' : 'a9b811a19fb078264e655c0c3c01acffda8d192e',
'assets/autorotate-150.jpg' : 'd837d5fb4239f9fe1e3566df34906e3f8d654275',
'assets/autorotate-square-200.jpg': '24efb279a78b0c33a8715215d6f976c1f086573a',
'assets/autorotate-square-50.jpg' : 'f716e975f6269c3b9649a04d4144c5481265169c'
'assets/autorotate-1200.jpg' : 'e8f5b75aa6c9859426c1d652d57a053444f897ff',
'assets/autorotate-150.jpg' : 'd837d5fb4239f9fe1e3566df34906e3f8d654275',
'assets/autorotate-260.jpg' : 'a9b811a19fb078264e655c0c3c01acffda8d192e',
'assets/autorotate-500.jpg' : 'c5437d9b2dbbf791931ca9089020c78ac8fd02a3',
'assets/autorotate-800.jpg' : '081df1cc1a3d7d76a0762f0d586dbecff221a25c',
'assets/autorotate-full.jpg' : 'efe10ac17cae71bd28c316728d6d29eeacc11fd8',
'assets/autorotate-horizontal-500.jpg': 'c5437d9b2dbbf791931ca9089020c78ac8fd02a3',
'assets/autorotate-square-200.jpg' : '24efb279a78b0c33a8715215d6f976c1f086573a',
'assets/autorotate-square-50.jpg' : 'f716e975f6269c3b9649a04d4144c5481265169c',
'assets/autorotate-vertical-500.jpg' : '11935afdde5f752d8d3e08242d9187392ba33aa5'
};

resize(image, output, function(err, versions) {
Expand Down

0 comments on commit 4f28e9a

Please sign in to comment.