@@ -328,29 +328,25 @@ mod tests {
328
328
329
329
let response = env. frontend ( ) . get ( "/crate/foo/0.1.0/builds" ) . send ( ) ?;
330
330
331
- // FIXME: temporarily we don't show in-progress releases anywhere, which means we don't
332
- // show releases without builds anywhere.
333
- assert_eq ! ( response. status( ) , StatusCode :: NOT_FOUND ) ;
334
-
335
- // assert_cache_control(&response, CachePolicy::NoCaching, &env.config());
336
- // let page = kuchikiki::parse_html().one(response.text()?);
331
+ assert_cache_control ( & response, CachePolicy :: NoCaching , & env. config ( ) ) ;
332
+ let page = kuchikiki:: parse_html ( ) . one ( response. text ( ) ?) ;
337
333
338
- // let rows: Vec<_> = page
339
- // .select("ul > li a.release")
340
- // .unwrap()
341
- // .map(|row| row.text_contents())
342
- // .collect();
334
+ let rows: Vec < _ > = page
335
+ . select ( "ul > li a.release" )
336
+ . unwrap ( )
337
+ . map ( |row| row. text_contents ( ) )
338
+ . collect ( ) ;
343
339
344
- // assert!(rows.is_empty());
340
+ assert ! ( rows. is_empty( ) ) ;
345
341
346
- // let warning = page
347
- // .select_first(".warning")
348
- // .expect("missing warning element")
349
- // .text_contents();
342
+ let warning = page
343
+ . select_first ( ".warning" )
344
+ . expect ( "missing warning element" )
345
+ . text_contents ( ) ;
350
346
351
- // assert!(warning.contains("has not built"));
352
- // assert!(warning.contains("queued"));
353
- // assert!(warning.contains("open an issue"));
347
+ assert ! ( warning. contains( "has not built" ) ) ;
348
+ assert ! ( warning. contains( "queued" ) ) ;
349
+ assert ! ( warning. contains( "open an issue" ) ) ;
354
350
355
351
Ok ( ( ) )
356
352
} ) ;
0 commit comments