+ def test_diary_entry_visible_comments
+ assert_equal 0, diary_entries(:normal_user_entry_1).visible_comments.count
+ assert_equal 1, diary_entries(:normal_user_geo_entry).visible_comments.count
+ end
+
+private
+
+ def diary_entry_valid(attrs, result = true)
+ entry = DiaryEntry.new(diary_entries(:normal_user_entry_1).attributes)
+ entry.assign_attributes(attrs)
+ assert_equal result, entry.valid?, "Expected #{attrs.inspect} to be #{result}"
+ end