Fix test of RDF.Literal.new/1 with plain datatype literals

This commit is contained in:
Marcel Otto 2020-05-06 22:31:33 +02:00
parent 24051c6153
commit 4fedb2cfc0

View file

@ -32,9 +32,9 @@ defmodule RDF.LiteralTest do
end
test "with typed literals" do
Enum.each Datatype.Registry.datatypes() -- [RDF.LangString], fn datatype ->
assert %Literal{literal: typed_literal} = Literal.new(datatype.new("foo"))
assert typed_literal.__struct__ == datatype
Enum.each Datatype.Registry.datatypes(), fn datatype ->
datatype_literal = datatype.new("foo").literal
assert %Literal{literal: ^datatype_literal} = Literal.new(datatype_literal)
end
end