Skip to content

Commit

Permalink
Add a test to cover incorrect prefix in the generic lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
pch committed Dec 6, 2023
1 parent 0cf4041 commit 3d12046
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_has_based_uuid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_generic_lookup

article = Article.create(id: SecureRandom.uuid)
assert_equal article, BasedUUID.find(article.based_uuid)
assert_raises(BasedUUID::Error) { BasedUUID.find("wrong_#{article.based_uuid(prefix: false)}") }
end

def test_based_uuid
Expand Down

0 comments on commit 3d12046

Please sign in to comment.