Skip to content

Commit

Permalink
test that an exception is throwed on decode! fail
Browse files Browse the repository at this point in the history
  • Loading branch information
awetzel committed Jul 5, 2015
1 parent 1c3a44f commit 45893b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/hashids_test.exs
Expand Up @@ -19,4 +19,10 @@ defmodule HashidsTest.Encode do
testcase_from_fixture_large "min_length_20_large"
testcase_from_fixture_large "short_alphabet_large"
testcase_from_fixture_large "long_alphabet_large"

test "decode! fail throws exception" do
assert_raise Hashids.DecodingError, fn->
Hashids.decode!(Hashids.new,"%%%%%")
end
end
end

0 comments on commit 45893b3

Please sign in to comment.