about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-29T19·37+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-03-29T19·39+0100
commit7d340689ba2ffca99aa166591483b8e662518f2c (patch)
tree14fce2ad9578ce8c5c472360da830001ad70534c /tools
parent946764f6bd8dc8a4c9653e0b148ed96d95aabd9c (diff)
Delete the stale tests
While this project would benefit from having test coverage, the current tests
are not providing any useful coverage.
Diffstat (limited to 'tools')
-rw-r--r--tools/url-blocker/Main.hs7
-rw-r--r--tools/url-blocker/Spec.hs38
2 files changed, 1 insertions, 44 deletions
diff --git a/tools/url-blocker/Main.hs b/tools/url-blocker/Main.hs
index 34197981598c..926412ce91f9 100644
--- a/tools/url-blocker/Main.hs
+++ b/tools/url-blocker/Main.hs
@@ -1,12 +1,7 @@
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE NamedFieldPuns #-}
 {-# LANGUAGE DeriveGeneric #-}
-module Main
-  ( main
-  , getRules
-  , URL(..)
-  , Rule(..)
-  ) where
+module Main ( main ) where
 
 --------------------------------------------------------------------------------
 -- Dependencies
diff --git a/tools/url-blocker/Spec.hs b/tools/url-blocker/Spec.hs
deleted file mode 100644
index b70d8619cb25..000000000000
--- a/tools/url-blocker/Spec.hs
+++ /dev/null
@@ -1,38 +0,0 @@
-module Spec (main) where
-
---------------------------------------------------------------------------------
--- Dependencies
---------------------------------------------------------------------------------
-
-import qualified Main as Main
-
-import Test.Hspec
-
---------------------------------------------------------------------------------
--- Tests
---------------------------------------------------------------------------------
-
-main :: IO ()
-main = hspec $ do
-  describe "getRules" $ do
-    it "returns the parsed rules from rules.json" $ do
-      rules <- Main.getRules
-      rules `shouldBe` [ Main.Rule { Main.urls = [ Main.URL "facebook.com"
-                                                 , Main.URL "www.facebook.com"
-                                                 , Main.URL "twitter.com"
-                                                 , Main.URL "www.twitter.com"
-                                                 , Main.URL "youtube.com"
-                                                 , Main.URL "www.youtube.com"
-                                                 , Main.URL "instagram.com"
-                                                 , Main.URL "www.instagram.com"
-                                                 ]
-                                   , Main.allowed = []
-                                   }
-                       , Main.Rule { Main.urls = [ Main.URL "chat.googleplex.com" ]
-                                   , Main.allowed = []
-                                   }
-                       ]
-
-  describe "Prelude.head" $ do
-    it "returns the first element of a list" $ do
-      head [23 ..] `shouldBe` (23 :: Int)