packages feed

lentil-0.1.1.0: test/Lentil/ExportSpec.hs

module Lentil.ExportSpec where


import Test.Hspec

import Lentil.Types
import Lentil.Export


is :: [Issue]
is = [Issue "file" 1 "da" [Tag "a", Tag "c"],
      Issue "file" 2 "db" [Tag "e:f"]]

csv :: String
csv = "\"Filepath\",\"Row\",\"Description\",\"Tags\"\n\
      \\"file\",\"1\",\"da\",\"a c\"\n\
      \\"file\",\"2\",\"db\",\"e:f\""


main :: IO ()
main = hspec spec

spec :: Spec
spec = do

  describe "issues2CSV" $ do
    it "exports issues to CSV" $
      issues2CSV is `shouldBe` csv