@@ -9,8 +9,8 @@ describe('cart handlers', () => {
99 let response = await router . fetch ( 'http://localhost:3000/cart/api/add' , {
1010 method : 'POST' ,
1111 body : new URLSearchParams ( {
12- bookId : '1 ' ,
13- slug : 'the-midnight-library ' ,
12+ bookId : '001 ' ,
13+ slug : 'bbq ' ,
1414 } ) ,
1515 redirect : 'manual' ,
1616 } )
@@ -24,8 +24,8 @@ describe('cart handlers', () => {
2424 let addResponse = await router . fetch ( 'http://localhost:3000/cart/api/add' , {
2525 method : 'POST' ,
2626 body : new URLSearchParams ( {
27- bookId : '2 ' ,
28- slug : 'atomic-habits ' ,
27+ bookId : '002 ' ,
28+ slug : 'heavy-metal ' ,
2929 } ) ,
3030 redirect : 'manual' ,
3131 } )
@@ -40,16 +40,16 @@ describe('cart handlers', () => {
4040 assert . equal ( response . status , 200 )
4141 let html = await response . text ( )
4242 assertContains ( html , 'Shopping Cart' )
43- assertContains ( html , 'Atomic Habits ' )
43+ assertContains ( html , 'Heavy Metal Guitar Riffs ' )
4444 } )
4545
4646 it ( 'cart persists state across requests with same session' , async ( ) => {
4747 // Add first item
4848 let addResponse1 = await router . fetch ( 'http://localhost:3000/cart/api/add' , {
4949 method : 'POST' ,
5050 body : new URLSearchParams ( {
51- bookId : '1 ' ,
52- slug : 'the-midnight-library ' ,
51+ bookId : '001 ' ,
52+ slug : 'bbq ' ,
5353 } ) ,
5454 redirect : 'manual' ,
5555 } )
@@ -61,8 +61,8 @@ describe('cart handlers', () => {
6161 let addRequest2 = requestWithSession ( 'http://localhost:3000/cart/api/add' , sessionId , {
6262 method : 'POST' ,
6363 body : new URLSearchParams ( {
64- bookId : '3 ' ,
65- slug : 'project-hail-mary ' ,
64+ bookId : '003 ' ,
65+ slug : 'three-ways ' ,
6666 } ) ,
6767 } )
6868 await router . fetch ( addRequest2 )
@@ -72,7 +72,7 @@ describe('cart handlers', () => {
7272 let cartResponse = await router . fetch ( cartRequest )
7373
7474 let html = await cartResponse . text ( )
75- assertContains ( html , 'The Midnight Library ' )
76- assertContains ( html , 'Project Hail Mary ' )
75+ assertContains ( html , 'Ash & Smoke ' )
76+ assertContains ( html , 'Three Ways to Change Your Life ' )
7777 } )
7878} )
0 commit comments