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