diff --git a/yesod-test/ChangeLog.md b/yesod-test/ChangeLog.md index 8afbf67c..7188ca92 100644 --- a/yesod-test/ChangeLog.md +++ b/yesod-test/ChangeLog.md @@ -4,6 +4,7 @@ * Fix quotes not matching in htmlContain* functions [#1768](https://github.com/yesodweb/yesod/pull/1768). * Add logging of the matches found of these functions [#1768](https://github.com/yesodweb/yesod/pull/1768). +* Improved failure messages from `assertEq`. [#1767](https://github.com/yesodweb/yesod/pull/1767) ## 1.6.13 diff --git a/yesod-test/Yesod/Test.hs b/yesod-test/Yesod/Test.hs index f6a9de04..8c580060 100644 --- a/yesod-test/Yesod/Test.hs +++ b/yesod-test/Yesod/Test.hs @@ -546,10 +546,8 @@ htmlQuery = htmlQuery' yedResponse [] -- @since 1.5.2 assertEq :: (HasCallStack, Eq a, Show a) => String -> a -> a -> YesodExample site () assertEq m a b = - liftIO $ HUnit.assertBool msg (a == b) - where msg = "Assertion: " ++ m ++ "\n" ++ - "First argument: " ++ ppShow a ++ "\n" ++ - "Second argument: " ++ ppShow b ++ "\n" + liftIO $ HUnit.assertEqual msg a b + where msg = "Assertion: " ++ m ++ "\n" -- | Asserts that the two given values are not equal. --