9be156100a
and - add some documentation - remove top-level expand_iri delegate
21 lines
476 B
Elixir
21 lines
476 B
Elixir
defmodule JSON.LD.UtilsTest do
|
|
use ExUnit.Case
|
|
doctest JSON.LD
|
|
|
|
import JSON.LD.Utils
|
|
|
|
describe "compact_iri_parts" do
|
|
test "returns the prefix and suffix of a compact IRI" do
|
|
assert compact_iri_parts("foo:bar") == ["foo", "bar"]
|
|
end
|
|
|
|
test "returns nil on absolute IRIs" do
|
|
assert compact_iri_parts("http://example.com/") == nil
|
|
end
|
|
|
|
test "returns nil on blank nodes" do
|
|
assert compact_iri_parts("_:bar") == nil
|
|
end
|
|
end
|
|
|
|
end
|