Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
POD
Commits
9117d22a
Unverified
Commit
9117d22a
authored
4 years ago
by
Vasili Novikov
Browse files
Options
Download
Email Patches
Plain Diff
Fix formatting
parent
5448dec3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/internal_api.rs
+7
-6
src/internal_api.rs
with
7 additions
and
6 deletions
+7
-6
src/internal_api.rs
+
7
-
6
View file @
9117d22a
...
...
@@ -597,11 +597,11 @@ mod tests {
{
let
tx
=
conn
.transaction
()
.unwrap
();
let
json
=
json!
({
"type"
:
"ItemPropertySchema"
,
"itemType"
:
"Person"
,
"propertyName"
:
"age"
,
"valueType"
:
"Integer"
,
});
"type"
:
"ItemPropertySchema"
,
"itemType"
:
"Person"
,
"propertyName"
:
"age"
,
"valueType"
:
"Integer"
,
});
let
create_item
:
CreateItem
=
serde_json
::
from_value
(
json
.clone
())
.unwrap
();
let
result
=
internal_api
::
create_item_tx
(
&
tx
,
&
minimal_schema
,
create_item
)
.unwrap
();
assert!
(
result
<
10
);
// no more than 10 items existed before in the DB
...
...
@@ -610,7 +610,8 @@ mod tests {
property_types
:
HashMap
::
new
(),
};
let
create_item
:
CreateItem
=
serde_json
::
from_value
(
json
)
.unwrap
();
let
result
=
internal_api
::
create_item_tx
(
&
tx
,
&
bad_empty_schema
,
create_item
)
.unwrap_err
();
let
result
=
internal_api
::
create_item_tx
(
&
tx
,
&
bad_empty_schema
,
create_item
)
.unwrap_err
();
assert_eq!
(
result
.code
,
StatusCode
::
BAD_REQUEST
);
assert!
(
result
.msg
.contains
(
"not defined in Schema"
));
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment