rdf-ex/test/unit/blank_node_test.exs

27 lines
553 B
Elixir
Raw Normal View History

2020-11-01 01:25:25 +00:00
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