@@ -44,7 +44,7 @@ describe('catalogHandler Tests', () => {
44
44
it ( 'should return 405 when method is not allowed' , async ( ) => {
45
45
const ctx = DEFAULT_CONTEXT ( {
46
46
info : { method : 'HEAD' } ,
47
- url : { pathname : '/org/site/catalog/store/view/product /sku1' } ,
47
+ url : { pathname : '/org/site/catalog/store/view/products /sku1' } ,
48
48
config : { } ,
49
49
} ) ;
50
50
const request = { } ;
@@ -53,23 +53,10 @@ describe('catalogHandler Tests', () => {
53
53
assert . equal ( response . status , 405 ) ;
54
54
} ) ;
55
55
56
- it ( 'should return 400 when sku is uppercase' , async ( ) => {
57
- const ctx = DEFAULT_CONTEXT ( {
58
- info : { method : 'GET' } ,
59
- url : { pathname : '/org/site/catalog/store/view/product/PRODUCT-SKU' } ,
60
- config : { } ,
61
- } ) ;
62
- const request = { } ;
63
- const response = await catalogHandler ( ctx , request ) ;
64
-
65
- assert . equal ( response . status , 400 ) ;
66
- assert . equal ( response . headers . get ( 'x-error' ) , 'Invalid SKU: SKU cannot contain uppercase letters' ) ;
67
- } ) ;
68
-
69
56
it ( 'should call handleProductLookupRequest when method is GET and subRoute is "lookup"' , async ( ) => {
70
57
const ctx = DEFAULT_CONTEXT ( {
71
58
info : { method : 'GET' } ,
72
- url : { pathname : '/org/site/catalog/store/view/lookup/sku ' } ,
59
+ url : { pathname : '/org/site/catalog/store/view/lookup' } ,
73
60
config : { } ,
74
61
} ) ;
75
62
const request = { } ;
@@ -86,7 +73,7 @@ describe('catalogHandler Tests', () => {
86
73
it ( 'should return 405 if subRoute is "lookup" but method is not GET' , async ( ) => {
87
74
const ctx = DEFAULT_CONTEXT ( {
88
75
info : { method : 'PUT' } ,
89
- url : { pathname : '/org/site/catalog/store/view/lookup/sku ' } ,
76
+ url : { pathname : '/org/site/catalog/store/view/lookup' } ,
90
77
config : { } ,
91
78
} ) ;
92
79
const request = { } ;
0 commit comments