Add tests for RDF.BlankNode.new/1

This commit is contained in:
Marcel Otto 2020-11-01 02:25:25 +01:00
parent c17cf8297c
commit ddb3d365bc

View file

@ -0,0 +1,26 @@
defmodule RDF.BlankNodeTest do
use RDF.Test.Case
doctest RDF.BlankNode
alias RDF.BlankNode
describe "new/1" do
test "with a string" do
assert BlankNode.new("foo") == %BlankNode{value: "foo"}
end
test "with an atom" do
assert BlankNode.new(:foo) == %BlankNode{value: "foo"}
end
test "with a integer" do
assert BlankNode.new(42) == %BlankNode{value: "42"}
end
test "with a ref" do
assert %BlankNode{value: value} = BlankNode.new(make_ref())
assert is_binary(value)
end
end
end