Delete the stale tests
While this project would benefit from having test coverage, the current tests are not providing any useful coverage.
This commit is contained in:
		
							parent
							
								
									946764f6bd
								
							
						
					
					
						commit
						7d340689ba
					
				
					 2 changed files with 1 additions and 44 deletions
				
			
		|  | @ -1,12 +1,7 @@ | |||
| {-# LANGUAGE OverloadedStrings #-} | ||||
| {-# LANGUAGE NamedFieldPuns #-} | ||||
| {-# LANGUAGE DeriveGeneric #-} | ||||
| module Main | ||||
|   ( main | ||||
|   , getRules | ||||
|   , URL(..) | ||||
|   , Rule(..) | ||||
|   ) where | ||||
| module Main ( main ) where | ||||
| 
 | ||||
| -------------------------------------------------------------------------------- | ||||
| -- Dependencies | ||||
|  |  | |||
|  | @ -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) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue