nixpkgs-update/test/UtilsSpec.hs
Ryan Mulligan 5749f0029a Remove cachix option
If you want to continue to use cachix, you need to set up a post-build
hook that pushes to cachix instead of using nixpkgs-update.
2020-08-17 21:11:26 -07:00

20 lines
607 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
module UtilsSpec where
import Test.Hspec
import qualified Utils
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "PR title" do
-- This breaks IRC when it tries to link to newly opened pull requests
it "should not include a trailing newline" do
let options = Utils.Options False False "" "" False False False
let updateEnv = Utils.UpdateEnv "foobar" "1.0" "1.1" (Just "https://update-site.com") options
let title = Utils.prTitle updateEnv "python37Packages.foobar"
title `shouldBe` "python37Packages.foobar: 1.0 -> 1.1"