diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-25 19:18:07 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-25 19:18:07 -0700 |
commit | 3bfc43df5810196c3aeafa5e0fc32308c55d76b2 (patch) | |
tree | efb6feeba3711a119c8fa6e274bb434d4d5d6762 /rust/tests/test_api_server.rs | |
parent | 51c519a0800ce23a69adced4530b12184b4172ce (diff) | |
download | fatcat-3bfc43df5810196c3aeafa5e0fc32308c55d76b2.tar.gz fatcat-3bfc43df5810196c3aeafa5e0fc32308c55d76b2.zip |
actually ON CONFLICT abstract creation (and test)
Diffstat (limited to 'rust/tests/test_api_server.rs')
-rw-r--r-- | rust/tests/test_api_server.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/rust/tests/test_api_server.rs b/rust/tests/test_api_server.rs index f43101c0..ca2d8df2 100644 --- a/rust/tests/test_api_server.rs +++ b/rust/tests/test_api_server.rs @@ -797,6 +797,27 @@ fn test_abstracts() { None, ); + // Same abstracts; checking that re-inserting works + check_response( + request::post( + "http://localhost:9411/v0/release", + headers.clone(), + r#"{"title": "some paper again", + "abstracts": [ + {"lang": "zh", + "mimetype": "text/plain", + "content": "some rando abstract 24iu3i25u2" }, + {"lang": "en", + "mimetype": "application/xml+jats", + "content": "some other abstract 99139405" } + ] + }"#, + &router, + ), + status::Created, + None, + ); + let editor_id = Uuid::parse_str("00000000-0000-0000-AAAA-000000000001").unwrap(); let editgroup_id = get_or_create_editgroup(editor_id, &conn).unwrap(); check_response( |