Skip to content

Commit

Permalink
Added test coverage for RecordNotFound raising.
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Mar 7, 2008
1 parent f131504 commit 07175b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/versioned_test.rb
Expand Up @@ -259,6 +259,9 @@ def test_find_version
assert_equal page_versions(:welcome_1), pages(:welcome).find_version(23)
assert_equal page_versions(:welcome_2), pages(:welcome).find_version(24)
assert_equal pages(:welcome), pages(:welcome).find_version

assert_raise(ActiveRecord::RecordNotFound) { Page.find_version(pages(:welcome).id, 1) }
assert_raise(ActiveRecord::RecordNotFound) { Page.find_version(0, 23) }
end

def test_with_sequence
Expand Down

0 comments on commit 07175b2

Please sign in to comment.