diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
 # Revision history for servant-event-stream
 
+## 0.3.2.1 -- 2026-02-27
+
+* Add guard space after colon in SSE field encoding. Without it, field values
+  starting with a space lost their leading space because the SSE spec strips
+  exactly one leading space from field values. (Issue #16)
+* Add unit tests for `encodeServerEvent`.
+
 ## 0.3.2.0 -- 2026-02-23
 
 * Support GHC 8.6 through 9.12 (base 4.12 to 4.21).
diff --git a/servant-event-stream.cabal b/servant-event-stream.cabal
--- a/servant-event-stream.cabal
+++ b/servant-event-stream.cabal
@@ -1,6 +1,6 @@
 cabal-version: >=1.10
 name: servant-event-stream
-version: 0.3.2.0
+version: 0.3.2.1
 stability: alpha
 synopsis: Servant support for Server-Sent events
 category: Servant, Web
@@ -51,4 +51,9 @@
   main-is: Spec.hs
   hs-source-dirs: tests
   default-language: Haskell2010
-  build-depends: base >=4.12 && <4.22
+  build-depends:
+    base >=4.12 && <4.22,
+    bytestring >=0.11.1.0 && <0.13,
+    hspec >=2.7 && <2.12,
+    servant >=0.15 && <0.21,
+    servant-event-stream
diff --git a/src/Servant/API/EventStream.hs b/src/Servant/API/EventStream.hs
--- a/src/Servant/API/EventStream.hs
+++ b/src/Servant/API/EventStream.hs
@@ -115,7 +115,7 @@
     <> mconcat (map (field "data:") (safelines (eventData e)))
  where
   optional name = maybe mempty (field name)
-  field name val = name <> val <> "\n"
+  field name val = name <> " " <> val <> "\n"
 
   -- discard CR and split LFs into multiple data values
   safelines = C8.lines . C8.filter (/= '\r')
diff --git a/tests/Spec.hs b/tests/Spec.hs
--- a/tests/Spec.hs
+++ b/tests/Spec.hs
@@ -1,2 +1,55 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module Main (main) where
+
+import qualified Data.ByteString.Lazy as LBS
+import Data.Proxy (Proxy (..))
+import Servant.API.ContentTypes (mimeRender)
+import Servant.API.EventStream
+import Test.Hspec
+
+render :: ServerEvent -> LBS.ByteString
+render = mimeRender (Proxy :: Proxy EventStream)
+
 main :: IO ()
-main = putStrLn "Test suite not yet implemented"
+main = hspec $ do
+  describe "MimeRender EventStream ServerEvent" $ do
+    it "encodes data-only event" $
+      render (ServerEvent Nothing Nothing "hello")
+        `shouldBe` "data: hello\n"
+
+    it "encodes event with all fields" $
+      render (ServerEvent (Just "update") (Just "1") "payload")
+        `shouldBe` "event: update\nid: 1\ndata: payload\n"
+
+    it "encodes multi-line data as multiple data fields" $
+      render (ServerEvent Nothing Nothing "line1\nline2\nline3")
+        `shouldBe` "data: line1\ndata: line2\ndata: line3\n"
+
+    it "preserves leading space in data value" $
+      render (ServerEvent Nothing Nothing " How")
+        `shouldBe` "data:  How\n"
+
+    it "preserves leading space in event type" $
+      render (ServerEvent (Just " custom") Nothing "x")
+        `shouldBe` "event:  custom\ndata: x\n"
+
+    it "preserves leading space in event id" $
+      render (ServerEvent Nothing (Just " 42") "x")
+        `shouldBe` "id:  42\ndata: x\n"
+
+    it "encodes empty data as empty output" $
+      render (ServerEvent Nothing Nothing "")
+        `shouldBe` ""
+
+    it "strips CR characters from data" $
+      render (ServerEvent Nothing Nothing "hello\r\nworld")
+        `shouldBe` "data: hello\ndata: world\n"
+
+    it "omits event field when Nothing" $
+      render (ServerEvent Nothing (Just "1") "x")
+        `shouldBe` "id: 1\ndata: x\n"
+
+    it "omits id field when Nothing" $
+      render (ServerEvent (Just "ping") Nothing "x")
+        `shouldBe` "event: ping\ndata: x\n"
