Skip to content

Commit

Permalink
Add Put test for mismatched doc ids
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Feb 10, 2024
1 parent 8f17ded commit 2da8f07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x/sqlite/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ func TestDBPut(t *testing.T) {
}
},
},
{
name: "doc id in url and doc differ",
docID: "foo",
doc: map[string]interface{}{
"_id": "bar",
"foo": "baz",
},
wantStatus: http.StatusBadRequest,
wantErr: "Document ID must match _id in document",
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 2da8f07

Please sign in to comment.