Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added document found assertion

  • Loading branch information...
commit 80ed6deab25973f71a50e698e1fc846e9eb6bf31 1 parent 6fb1b01
@jnunemaker jnunemaker authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  test/functional/test_modifiers.rb
View
2  test/functional/test_modifiers.rb
@@ -25,6 +25,7 @@ def setup
def assert_page_counts(page, day_count, week_count, month_count)
doc = page.collection.find_one({:_id => page.id})
+ assert doc, "Could not find document with _id => #{page.id.inspect}"
doc.fetch('day_count').should == day_count
doc.fetch('week_count').should == week_count
doc.fetch('month_count').should == month_count
@@ -33,6 +34,7 @@ def assert_page_counts(page, day_count, week_count, month_count)
def assert_keys_removed(page, *keys)
keys.each do |key|
doc = page.class.collection.find_one({:_id => page.id})
+ assert doc, "Could not find document with _id => #{page.id.inspect}"
doc.keys.should_not include(key)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.