-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I did this change on the json example
diff --git a/examples/json/src/Json.hs b/examples/json/src/Json.hs
index db30868..0f55b64 100644
--- a/examples/json/src/Json.hs
+++ b/examples/json/src/Json.hs
@@ -18,7 +18,7 @@ data Country = Country
instance ToJSON Country
-ecuador = Country "Ecuador" "America" 1
+ecuador = Country "Ecuador" "America Change" 1
germany = Country "Germany" "Europe" 2
japan = Country "Japan" "Asia" 4Ran the test and as expected I get this result
JsonGolden
encodeCountries
encodes a group of Countries into a JSON bytestring [✘]
Files golden and actual not match
Failures:
test/JsonGoldenSpec.hs:25:4:
1) JsonGolden.encodeCountries encodes a group of Countries into a JSON bytestring
expected: "[{\"cname\":\"Ecuador\",\"continent\":\"America\",\"ctag\":1},{\"cname\":\"Germany\",\"continent\":\"Europe\",\"ctag\":2},{\"cname\":\"Japan\",\"continent\":\"Asia\",\"ctag\":4}]"
but got: "[{\"cname\":\"Ecuador\",\"continent\":\"America Change\",\"ctag\":1},{\"cname\":\"Germany\",\"continent\":\"Europe\",\"ctag\":2},{\"cname\":\"Japan\",\"continent\":\"Asia\",\"ctag\":4}]"
To rerun use: --match "/JsonGolden/encodeCountries/encodes a group of Countries into a JSON bytestring /"
Randomized with seed 2045427810
Finished in 0.0024 seconds
1 example, 1 failure
So I ran stack exec hgold -- --update .otherGolden/ and I get this from stdout
Replacing golden with actual:
Finished!
However, when I ran the test again. I get the same failing result
JsonGolden
encodeCountries
encodes a group of Countries into a JSON bytestring [✘]
Files golden and actual not match
Failures:
test/JsonGoldenSpec.hs:25:4:
1) JsonGolden.encodeCountries encodes a group of Countries into a JSON bytestring
expected: "[{\"cname\":\"Ecuador\",\"continent\":\"America\",\"ctag\":1},{\"cname\":\"Germany\",\"continent\":\"Europe\",\"ctag\":2},{\"cname\":\"Japan\",\"continent\":\"Asia\",\"ctag\":4}]"
but got: "[{\"cname\":\"Ecuador\",\"continent\":\"America Change\",\"ctag\":1},{\"cname\":\"Germany\",\"continent\":\"Europe\",\"ctag\":2},{\"cname\":\"Japan\",\"continent\":\"Asia\",\"ctag\":4}]"
To rerun use: --match "/JsonGolden/encodeCountries/encodes a group of Countries into a JSON bytestring /"
Randomized with seed 1668369998
Finished in 0.0025 seconds
1 example, 1 failure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels