@@ -24,7 +24,7 @@ test("getting events for a given host", async () => {
2424} ) ;
2525
2626describe ( "Event lifecycle tests" , async ( ) => {
27- let createdEventUuid ;
27+ let createdEventUuid : string ;
2828 test ( "creating an event" , { timeout : 30000 } , async ( ) => {
2929 const token = await createJwt ( ) ;
3030 const response = await fetch ( `${ baseEndpoint } /api/v1/events` , {
@@ -34,13 +34,14 @@ describe("Event lifecycle tests", async () => {
3434 "Content-Type" : "application/json" ,
3535 } ,
3636 body : JSON . stringify ( {
37- title : "Testing Event" ,
37+ title : "Live Testing Event" ,
3838 description : "An event of all time" ,
3939 start : "2024-12-31T02:00:00" ,
4040 end : "2024-12-31T03:30:00" ,
4141 location : "ACM Room (Siebel 1104)" ,
4242 host : "ACM" ,
4343 featured : true ,
44+ repeats : "weekly" ,
4445 } ) ,
4546 } ) ;
4647 const responseJson = await response . json ( ) ;
@@ -49,6 +50,26 @@ describe("Event lifecycle tests", async () => {
4950 expect ( responseJson ) . toHaveProperty ( "resource" ) ;
5051 createdEventUuid = responseJson . id ;
5152 } ) ;
53+ test ( "getting a created event" , { timeout : 30000 } , async ( ) => {
54+ if ( ! createdEventUuid ) {
55+ throw new Error ( "Event UUID not found" ) ;
56+ }
57+ const response = await fetch (
58+ `${ baseEndpoint } /api/v1/events/${ createdEventUuid } ?ts=${ Date . now ( ) } ` ,
59+ {
60+ method : "GET" ,
61+ headers : {
62+ "Content-Type" : "application/json" ,
63+ } ,
64+ } ,
65+ ) ;
66+ const responseJson = await response . json ( ) ;
67+ expect ( response . status ) . toBe ( 200 ) ;
68+ expect ( responseJson ) . toHaveProperty ( "id" ) ;
69+ expect ( responseJson ) . toHaveProperty ( "repeats" ) ;
70+ expect ( responseJson [ "repeatEnds" ] ) . toBeUndefined ( ) ;
71+ createdEventUuid = responseJson . id ;
72+ } ) ;
5273
5374 test ( "deleting a previously-created event" , { timeout : 30000 } , async ( ) => {
5475 if ( ! createdEventUuid ) {
@@ -72,7 +93,7 @@ describe("Event lifecycle tests", async () => {
7293 throw new Error ( "Event UUID not found" ) ;
7394 }
7495 const response = await fetch (
75- `${ baseEndpoint } /api/v1/events/${ createdEventUuid } ` ,
96+ `${ baseEndpoint } /api/v1/events/${ createdEventUuid } ?ts= ${ Date . now ( ) } ` ,
7697 {
7798 method : "GET" ,
7899 } ,
0 commit comments