Closed cmgrulke closed 3 years ago
With the fixtures loaded, there will be a Record object with external_id
of 47 and list id of 2.
This POST will attempt to create another Record with those same values:
{
"data": {
"type": "record",
"attributes": {
"external_id": "47",
"score": 4.7,
"message": "I made a record",
"is_validated": false
},
"relationships": {
"list": {
"data": {
"id": 2,
"type": "list"
}
},
"substance": {
"data": {
"id": 2,
"type": "substance"
}
}
}
}
}
When it fails, change the external_id
and try again. It will succeed. Then change the id for the "list" relationship to "1" and it should succeed again.
As a researcher I want external ids to be unique within a list So that they can actually be guaranteed to be clear identifiers back to an external source
Acceptance Criteria:
Test: