about summary refs log tree commit diff
path: root/test/Xanthous/EntitiesSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Xanthous/EntitiesSpec.hs')
-rw-r--r--test/Xanthous/EntitiesSpec.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Xanthous/EntitiesSpec.hs b/test/Xanthous/EntitiesSpec.hs
new file mode 100644
index 000000000000..14b03f729331
--- /dev/null
+++ b/test/Xanthous/EntitiesSpec.hs
@@ -0,0 +1,20 @@
+--------------------------------------------------------------------------------
+module Xanthous.EntitiesSpec where
+--------------------------------------------------------------------------------
+import           Test.Prelude
+--------------------------------------------------------------------------------
+import qualified Data.Aeson as JSON
+--------------------------------------------------------------------------------
+import           Xanthous.Entities
+--------------------------------------------------------------------------------
+
+main :: IO ()
+main = defaultMain test
+
+test :: TestTree
+test = testGroup "Xanthous.Entities"
+  [ testGroup "EntityChar"
+    [ testProperty "JSON round-trip" $ \(ec :: EntityChar) ->
+        JSON.decode (JSON.encode ec) === Just ec
+    ]
+  ]