diff --git a/document_test.go b/document_test.go index 1276a811..b9329be3 100644 --- a/document_test.go +++ b/document_test.go @@ -280,6 +280,8 @@ func TestMarshalDocument(t *testing.T) { payload, err := MarshalDocument(test.doc, url) assert.NoError(err) + payload = append(payload, '\n') + // Golden file filename := strings.ReplaceAll(test.name, " ", "_") + ".json" path := filepath.Join("testdata", "goldenfiles", "marshaling", filename) diff --git a/testdata/goldenfiles/marshaling/collection.json b/testdata/goldenfiles/marshaling/collection.json index 723ebbee..341393d0 100644 --- a/testdata/goldenfiles/marshaling/collection.json +++ b/testdata/goldenfiles/marshaling/collection.json @@ -141,4 +141,4 @@ "links": { "self": "https://example.org/fake/path?fields%5Bmocktype%5D=bool%2Cint%2Cstr%2Ctime%2Cto-1%2Cto-x-from-1%2Cuint64" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/collection_with_inclusions.json b/testdata/goldenfiles/marshaling/collection_with_inclusions.json index ab665094..a3620f55 100644 --- a/testdata/goldenfiles/marshaling/collection_with_inclusions.json +++ b/testdata/goldenfiles/marshaling/collection_with_inclusions.json @@ -35,4 +35,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/empty_collection.json b/testdata/goldenfiles/marshaling/empty_collection.json index f7c23817..d5d8d299 100644 --- a/testdata/goldenfiles/marshaling/empty_collection.json +++ b/testdata/goldenfiles/marshaling/empty_collection.json @@ -6,4 +6,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/empty_data.json b/testdata/goldenfiles/marshaling/empty_data.json index 5300796c..324b0298 100644 --- a/testdata/goldenfiles/marshaling/empty_data.json +++ b/testdata/goldenfiles/marshaling/empty_data.json @@ -6,4 +6,4 @@ "links": { "self": "https://example.org/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/error.json b/testdata/goldenfiles/marshaling/error.json index c904c94c..d03ad694 100644 --- a/testdata/goldenfiles/marshaling/error.json +++ b/testdata/goldenfiles/marshaling/error.json @@ -13,4 +13,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/errors.json b/testdata/goldenfiles/marshaling/errors.json index 2f6effb8..37707c3a 100644 --- a/testdata/goldenfiles/marshaling/errors.json +++ b/testdata/goldenfiles/marshaling/errors.json @@ -19,4 +19,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/identifier.json b/testdata/goldenfiles/marshaling/identifier.json index f950090f..53793109 100644 --- a/testdata/goldenfiles/marshaling/identifier.json +++ b/testdata/goldenfiles/marshaling/identifier.json @@ -9,4 +9,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/identifiers.json b/testdata/goldenfiles/marshaling/identifiers.json index 7899a0d1..64761cb1 100644 --- a/testdata/goldenfiles/marshaling/identifiers.json +++ b/testdata/goldenfiles/marshaling/identifiers.json @@ -19,4 +19,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%" } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/meta.json b/testdata/goldenfiles/marshaling/meta.json index dd6460c3..31aa7d06 100644 --- a/testdata/goldenfiles/marshaling/meta.json +++ b/testdata/goldenfiles/marshaling/meta.json @@ -11,4 +11,4 @@ "f2": 42, "f3": true } -} \ No newline at end of file +} diff --git a/testdata/goldenfiles/marshaling/resource.json b/testdata/goldenfiles/marshaling/resource.json index 566d8c2d..44ba41a2 100644 --- a/testdata/goldenfiles/marshaling/resource.json +++ b/testdata/goldenfiles/marshaling/resource.json @@ -44,4 +44,4 @@ "links": { "self": "/fake/path?fields%5Bmocktype%5D=bool%2Cbytes%2Cint%2Cstr%2Ctime%2Cto-1%2Cto-x-from-1%2Cuint64" } -} \ No newline at end of file +}