Skip to content

Commit

Permalink
update hasValue sh:not error message
Browse files Browse the repository at this point in the history
Also fix a typo
  • Loading branch information
dpetran committed Aug 10, 2023
1 parent af46cdd commit 226a47e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fluree/db/json_ld/shacl.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
[false (str "sh:in: value " val " must be one of " in)]))
has-value-results (when has-value
(if (some #(= (flake/o %) has-value) p-flakes)
[true (str "sh:not sh:hasValue: at least one value must not be " has-value)]
[true (str "sh:not sh:hasValue: none of the values can be " has-value)]
[false (str "sh:hasValue: at least one value must be " has-value)]))
datatype-results (when datatype
(if (every? #(= (flake/dt %) datatype) p-flakes)
Expand Down
2 changes: 1 addition & 1 deletion test/fluree/db/shacl/shacl_basic_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@
(is (util/exception? invalid-person))
(is (= "SHACL PropertyShape exception - sh:hasValue: at least one value must be true."
(ex-message invalid-person)))))
(testing "extended path contstraints"
(testing "extended path constraints"
(let [db1 @(fluree/stage db0 [{"id" "ex:PersonShape"
"type" "sh:NodeShape"
"sh:targetClass" {"id" "ex:Person"}
Expand Down

0 comments on commit 226a47e

Please sign in to comment.