Add test to check package id extraction
This commit add a failing test to check extracting package id. The test will
fail with the following output for now:
1) Cradle.getPackageDbPackages find a config file and extracts packages with their ids
expected: [("template-haskell",Just "template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c")]
but got: []
This commit is contained in:
@@ -53,6 +53,11 @@ spec = do
|
||||
it "throws an error if a config file is broken" $ do
|
||||
getPackageDbDir "test/data/bad.config" `shouldThrow` anyException
|
||||
|
||||
describe "getPackageDbPackages" $ do
|
||||
it "find a config file and extracts packages with their ids" $ do
|
||||
pkgs <- getPackageDbPackages "test/data/check-packageid"
|
||||
pkgs `shouldBe` [("template-haskell", Just "template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c")]
|
||||
|
||||
relativeCradle :: FilePath -> Cradle -> Cradle
|
||||
relativeCradle dir cradle = cradle {
|
||||
cradleCurrentDir = toRelativeDir dir $ cradleCurrentDir cradle
|
||||
|
||||
Reference in New Issue
Block a user