about summary refs log tree commit diff
path: root/web/atward/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'web/atward/src/tests.rs')
-rw-r--r--web/atward/src/tests.rs76
1 files changed, 0 insertions, 76 deletions
diff --git a/web/atward/src/tests.rs b/web/atward/src/tests.rs
index a23f96ee9a74..eb205fdf9810 100644
--- a/web/atward/src/tests.rs
+++ b/web/atward/src/tests.rs
@@ -44,38 +44,12 @@ fn depot_path_cgit_query() {
 }
 
 #[test]
-fn depot_path_sourcegraph_query() {
-    assert_eq!(
-        dispatch(
-            &handlers(),
-            &Query {
-                query: "//web/atward/default.nix".to_string(),
-                cs: true,
-            }
-        ),
-        Some("https://cs.tvl.fyi/depot/-/tree/web/atward/default.nix".to_string()),
-    );
-
-    assert_eq!(
-        dispatch(
-            &handlers(),
-            &Query {
-                query: "/not/a/depot/path".to_string(),
-                cs: true,
-            }
-        ),
-        None
-    );
-}
-
-#[test]
 fn depot_root_cgit_query() {
     assert_eq!(
         dispatch(
             &handlers(),
             &Query {
                 query: "//".to_string(),
-                cs: false,
             }
         ),
         Some("https://code.tvl.fyi/tree/".to_string()),
@@ -112,7 +86,6 @@ fn request_to_query() {
             .expect("request should parse to a query"),
         Query {
             query: "b/42".to_string(),
-            cs: false,
         },
     );
 
@@ -123,55 +96,6 @@ fn request_to_query() {
 }
 
 #[test]
-fn settings_from_cookie() {
-    assert_eq!(
-        Query::from_request(&Request::fake_http(
-            "GET",
-            "/?q=b%2F42",
-            vec![("Cookie".to_string(), "cs=true;".to_string())],
-            vec![]
-        ))
-        .expect("request should parse to a query"),
-        Query {
-            query: "b/42".to_string(),
-            cs: true,
-        },
-    );
-}
-
-#[test]
-fn settings_from_query_parameter() {
-    assert_eq!(
-        Query::from_request(&Request::fake_http(
-            "GET",
-            "/?q=b%2F42&cs=true",
-            vec![],
-            vec![]
-        ))
-        .expect("request should parse to a query"),
-        Query {
-            query: "b/42".to_string(),
-            cs: true,
-        },
-    );
-
-    // Query parameter should override cookie
-    assert_eq!(
-        Query::from_request(&Request::fake_http(
-            "GET",
-            "/?q=b%2F42&cs=false",
-            vec![("Cookie".to_string(), "cs=true;".to_string())],
-            vec![]
-        ))
-        .expect("request should parse to a query"),
-        Query {
-            query: "b/42".to_string(),
-            cs: false,
-        },
-    );
-}
-
-#[test]
 fn depot_revision_query() {
     assert_eq!(
         dispatch(&handlers(), &"r/3002".into()),