Skip to content

Commit

Permalink
Append newline to golden files
Browse files Browse the repository at this point in the history
  • Loading branch information
mfcochauxlaberge authored Oct 8, 2022
1 parent 57b9fdf commit 8543be9
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/empty_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/empty_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"links": {
"self": "https://example.org/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/identifier.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/identifiers.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%"
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"f2": 42,
"f3": true
}
}
}
2 changes: 1 addition & 1 deletion testdata/goldenfiles/marshaling/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
"links": {
"self": "/fake/path?fields%5Bmocktype%5D=bool%2Cbytes%2Cint%2Cstr%2Ctime%2Cto-1%2Cto-x-from-1%2Cuint64"
}
}
}

0 comments on commit 8543be9

Please sign in to comment.