@@ -194,19 +194,36 @@ describe('cdn helper', function () {
194
194
] , done ) ;
195
195
} ) ;
196
196
197
- it ( 'should return a webDav asset if webdav protocol specified' , function ( done ) {
197
+ it ( 'should return an original cdn img asset if webdav protocol specified but file type indicates it is an image ' , function ( done ) {
198
198
runTestCases ( [
199
199
{
200
200
input : '{{cdn "webdav:img/image.jpg"}}' ,
201
- output : 'https://cdn.bcapp/3dsf74g/content/img/image.jpg' ,
201
+ output : 'https://cdn.bcapp/3dsf74g/images/stencil/original/ content/img/image.jpg' ,
202
202
} ,
203
203
{
204
204
input : '{{cdn "webdav:/img/image.jpg"}}' ,
205
- output : 'https://cdn.bcapp/3dsf74g/content/img/image.jpg' ,
205
+ output : 'https://cdn.bcapp/3dsf74g/images/stencil/original/ content/img/image.jpg' ,
206
206
} ,
207
207
{
208
208
input : '{{cdn "webdav://img/image.jpg"}}' ,
209
- output : 'https://cdn.bcapp/3dsf74g/content/img/image.jpg' ,
209
+ output : 'https://cdn.bcapp/3dsf74g/images/stencil/original/content/img/image.jpg' ,
210
+ } ,
211
+ ] , done ) ;
212
+ } ) ;
213
+
214
+ it ( 'should return a webDav asset if webdav protocol specified but is not a supported image type' , function ( done ) {
215
+ runTestCases ( [
216
+ {
217
+ input : '{{cdn "webdav:img/image.pdf"}}' ,
218
+ output : 'https://cdn.bcapp/3dsf74g/content/img/image.pdf' ,
219
+ } ,
220
+ {
221
+ input : '{{cdn "webdav:/img/image.pdf"}}' ,
222
+ output : 'https://cdn.bcapp/3dsf74g/content/img/image.pdf' ,
223
+ } ,
224
+ {
225
+ input : '{{cdn "webdav://img/image.pdf"}}' ,
226
+ output : 'https://cdn.bcapp/3dsf74g/content/img/image.pdf' ,
210
227
} ,
211
228
] , done ) ;
212
229
} ) ;
0 commit comments