aboutsummaryrefslogtreecommitdiffstats
path: root/rust/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-13 19:36:57 +0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-13 19:36:57 +0800
commit54abbfcd57fa82624504a1f2f359aa668e75f3d8 (patch)
treeef84f9de9f734386678c27c98685c4da27311d51 /rust/tests
parent061e66c4c41063e6b7321f1f421b5152e9e5a84d (diff)
downloadfatcat-54abbfcd57fa82624504a1f2f359aa668e75f3d8.tar.gz
fatcat-54abbfcd57fa82624504a1f2f359aa668e75f3d8.zip
skeleton out new schema features
Diffstat (limited to 'rust/tests')
-rw-r--r--rust/tests/test_old_python_tests.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/rust/tests/test_old_python_tests.rs b/rust/tests/test_old_python_tests.rs
index dde8d66e..eae131a7 100644
--- a/rust/tests/test_old_python_tests.rs
+++ b/rust/tests/test_old_python_tests.rs
@@ -30,7 +30,8 @@ fn test_api_rich_create() {
_ => unreachable!(),
};
- let mut new_container = ContainerEntity::new("schmournal".to_string());
+ let mut new_container = ContainerEntity::new();
+ new_container.name = Some("schmournal".to_string());
new_container.publisher = Some("society of authors".to_string());
new_container.issnl = Some("2222-3333".to_string());
// extra=dict(a=2, i="zing"))),
@@ -43,7 +44,8 @@ fn test_api_rich_create() {
_ => unreachable!(),
};
- let mut new_creator = CreatorEntity::new("anon y. mouse".to_string());
+ let mut new_creator = CreatorEntity::new();
+ new_creator.display_name = Some("anon y. mouse".to_string());
new_creator.orcid = Some("0000-0002-1825-0097".to_string());
// extra=dict(a=2, i="zing"))),
let resp = client
@@ -67,7 +69,8 @@ fn test_api_rich_create() {
};
// this stub work will be referenced
- let mut new_release = ReleaseEntity::new("derivative work".to_string());
+ let mut new_release = ReleaseEntity::new();
+ new_release.title = Some("derivative work".to_string());
new_release.release_type = Some("article-journal".to_string());
new_release.work_id = Some(work_id.clone());
let mut contrib = ReleaseContrib::new();
@@ -87,7 +90,8 @@ fn test_api_rich_create() {
_ => unreachable!(),
};
- let mut new_release = ReleaseEntity::new("dummy work".to_string());
+ let mut new_release = ReleaseEntity::new();
+ new_release.title = Some("dummy work".to_string());
new_release.release_type = Some("book".to_string());
new_release.work_id = Some(work_id.clone());
new_release.container_id = Some(container_id.clone());