2016-01-10 11:12:38 +00:00
|
|
|
defmodule ISN.UPCTest do
|
2015-05-27 16:15:09 +00:00
|
|
|
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
|
2015-05-27 16:15:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "load" do
|
2016-01-10 11:12:38 +00:00
|
|
|
assert ISN.UPC.load(@test_upc) == {:ok, @test_upc}
|
2015-05-27 16:15:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test "dump" do
|
2016-01-10 11:12:38 +00:00
|
|
|
assert ISN.UPC.dump(@test_upc) == {:ok, @test_upc}
|
2015-05-27 16:15:09 +00:00
|
|
|
end
|
|
|
|
|
end
|