isn/test/isn/upc_test.exs

19 lines
364 B
Elixir
Raw Normal View History

2016-01-10 11:12:38 +00:00
defmodule ISN.UPCTest do
use ExUnit.Case, async: true
@test_upc "220356483481"
test "cast" do
2016-01-10 11:12:38 +00:00
assert ISN.UPC.cast(@test_upc) == {:ok, @test_upc}
assert ISN.UPC.cast(nil) == :error
end
test "load" do
2016-01-10 11:12:38 +00:00
assert ISN.UPC.load(@test_upc) == {:ok, @test_upc}
end
test "dump" do
2016-01-10 11:12:38 +00:00
assert ISN.UPC.dump(@test_upc) == {:ok, @test_upc}
end
end