#1838: Not all unit tests are passing in postgresql

Type: BugItem Feature: Infrastructure Tags: colivre
ScheduledFor: N/A Assigned to: Nobody Sites:  
Priority: 0 Status: Pending  

Description of the bug

  2) Error:
test_should_create_the_notification_to_the_friend_when_one_friend_has_the_notification_and_the_other_no(ArticleTest):
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.last
    ./test/unit/article_test.rb:1201:in `test_should_create_the_notification_to_the_friend_when_one_friend_has_the_notification_and_the_other_no'
    /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
    /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

  3) Error:
test_should_create_the_notification_to_the_member_when_one_member_has_the_notification_and_the_other_no(ArticleTest):
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.last
    ./test/unit/article_test.rb:1133:in `test_should_create_the_notification_to_the_member_when_one_member_has_the_notification_and_the_other_no'
    /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
    /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

  4) Failure:
test_should_order_recent_articles_by_published_at(ArticleTest)
    [./test/unit/article_test.rb:219:in `test_should_order_recent_articles_by_published_at'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<[#<Article id: 509, name: "first", slug: "first", path: "first", parent_id: nil, body: nil, abstract: nil, profile_id: 348, updated_at: "2011-02-01 22:07:56", created_at: "2011-02-01 22:07:56", last_changed_by_id: nil, version: 2, type: nil, size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: {}, notify_comments: true, hits: 0, published_at: "2011-02-01 22:07:58", source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>,
 #<Article id: 510, name: "second", slug: "second", path: "second", parent_id: nil, body: nil, abstract: nil, profile_id: 348, updated_at: "2011-02-01 22:07:56", created_at: "2011-02-01 22:07:56", last_changed_by_id: nil, version: 1, type: nil, size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: {}, notify_comments: true, hits: 0, published_at: "2011-02-01 22:07:57", source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>]> expected but was
<[#<Article id: 510, name: "second", slug: "second", path: "second", parent_id: nil, body: nil, abstract: nil, profile_id: 348, updated_at: "2011-02-01 22:07:56", created_at: "2011-02-01 22:07:56", last_changed_by_id: nil, version: 1, type: nil, size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: "2011-02-01", source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>,
 #<Article id: 509, name: "first", slug: "first", path: "first", parent_id: nil, body: nil, abstract: nil, profile_id: 348, updated_at: "2011-02-01 22:07:56", created_at: "2011-02-01 22:07:56", last_changed_by_id: nil, version: 2, type: nil, size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: "2011-02-01", source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>]>.

  5) Failure:
test_should_rotate_translations_when_root_article_is_destroyed(ArticleTest)
    [./test/unit/article_test.rb:1354:in `test_should_rotate_translations_when_root_article_is_destroyed'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<false> is not true.

  6) Failure:
test_should_search_for_recent_documents(ArticleTest)
    [./test/unit/article_test.rb:160:in `test_should_search_for_recent_documents'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<[#<Article id: 589, name: "first", slug: "first", path: "first", parent_id: nil, body: nil, abstract: nil, profile_id: 399, updated_at: "2011-02-01 22:07:58", created_at: "2011-02-01 22:07:58", last_changed_by_id: nil, version: 1, type: nil, size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: {}, notify_comments: true, hits: 0, published_at: "2011-02-01 22:07:58", source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>,
 #<TextArticle id: 588, name: "fifth", slug: "my-article-359", path: "my-article-359", parent_id: nil, body: nil, abstract: nil, profile_id: 398, updated_at: nil, created_at: nil, last_changed_by_id: nil, version: nil, type: "TextArticle", size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: nil, source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>,
 #<TextArticle id: 587, name: "fourth", slug: "my-article-358", path: "my-article-358", parent_id: nil, body: nil, abstract: nil, profile_id: 398, updated_at: nil, created_at: nil, last_changed_by_id: nil, version: nil, type: "TextArticle", size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: nil, source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>]> expected but was
<[#<TextArticle id: 588, name: "fifth", slug: "my-article-359", path: "my-article-359", parent_id: nil, body: nil, abstract: nil, profile_id: 398, updated_at: nil, created_at: nil, last_changed_by_id: nil, version: nil, type: "TextArticle", size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: nil, source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>,
 #<TextArticle id: 587, name: "fourth", slug: "my-article-358", path: "my-article-358", parent_id: nil, body: nil, abstract: nil, profile_id: 398, updated_at: nil, created_at: nil, last_changed_by_id: nil, version: nil, type: "TextArticle", size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: nil, source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>,
 #<TextArticle id: 586, name: "third", slug: "my-article-357", path: "my-article-357", parent_id: nil, body: nil, abstract: nil, profile_id: 398, updated_at: nil, created_at: nil, last_changed_by_id: nil, version: nil, type: "TextArticle", size: nil, content_type: nil, filename: nil, height: nil, width: nil, comments_count: 0, advertise: true, published: true, start_date: nil, end_date: nil, children_count: 0, accept_comments: true, reference_article_id: nil, setting: nil, notify_comments: true, hits: 0, published_at: nil, source: nil, highlighted: false, external_link: nil, thumbnails_processed: false, is_image: false, translation_of_id: nil, language: nil, source_name: nil>]>.

  7) Failure:
test_should_find_person_and_enterprise_by_radius_and_region(EnvironmentFinderTest)
    [./test/test_helper.rb:83:in `assert_includes'
     ./test/unit/environment_finder_test.rb:90:in `test_should_find_person_and_enterprise_by_radius_and_region'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<[]> expected to include <#<Enterprise id: 112, name: "test 1", type: "Enterprise", identifier: "test1", environment_id: 1, active: true, address: nil, contact_phone: nil, home_page_id: nil, user_id: nil, region_id: nil, data: nil, created_at: nil, lat: 45.0, lng: 45.0, geocode_precision: nil, enabled: true, nickname: nil, custom_header: nil, custom_footer: nil, theme: nil, public_profile: true, birth_date: nil, preferred_domain_id: nil, updated_at: nil, visible: true>>.
<false> is not true.

  8) Failure:
test_should_find_more_popular_people(PersonTest)
    [./test/unit/person_test.rb:641:in `test_should_find_more_popular_people'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<[#<Person id: 664, name: "Person 1650", type: "Person", identifier: "person-1650", environment_id: 1, active: true, address: nil, contact_phone: nil, home_page_id: nil, user_id: nil, region_id: nil, data: nil, created_at: "2011-02-01 22:09:56", lat: nil, lng: nil, geocode_precision: nil, enabled: true, nickname: nil, custom_header: nil, custom_footer: nil, theme: nil, public_profile: true, birth_date: nil, preferred_domain_id: nil, updated_at: nil, visible: true>,
 #<Person id: 665, name: "Person 1652", type: "Person", identifier: "person-1652", environment_id: 1, active: true, address: nil, contact_phone: nil, home_page_id: nil, user_id: nil, region_id: nil, data: nil, created_at: "2011-02-01 22:09:56", lat: nil, lng: nil, geocode_precision: nil, enabled: true, nickname: nil, custom_header: nil, custom_footer: nil, theme: nil, public_profile: true, birth_date: nil, preferred_domain_id: nil, updated_at: nil, visible: true>]> expected but was
<[#<Person id: 665, name: "Person 1652", type: "Person", identifier: "person-1652", environment_id: 1, active: true, address: nil, contact_phone: nil, home_page_id: nil, user_id: nil, region_id: nil, data: nil, created_at: "2011-02-01 22:09:56", lat: nil, lng: nil, geocode_precision: nil, enabled: true, nickname: nil, custom_header: nil, custom_footer: nil, theme: nil, public_profile: true, birth_date: nil, preferred_domain_id: nil, updated_at: nil, visible: true>, #<Person id: 664, name: "Person 1650", type: "Person", identifier: "person-1650", environment_id: 1, active: true, address: nil, contact_phone: nil, home_page_id: nil, user_id: nil, region_id: nil, data: nil, created_at: "2011-02-01 22:09:56", lat: nil, lng: nil, geocode_precision: nil, enabled: true, nickname: nil, custom_header: nil, custom_footer: nil, theme: nil, public_profile: true, birth_date: nil, preferred_domain_id: nil, updated_at: nil, visible: true>]>.

  9) Failure:
test_should_the_community_tracked_action_be_notified_to_the_author_and_to_community_members(PersonTest)
    [/home/joenio/src/noosfero/lib/authenticated_test_helper.rb:43:in `assert_difference'
     ./test/unit/person_test.rb:886:in `test_should_the_community_tracked_action_be_notified_to_the_author_and_to_community_members'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
ActionTrackerNotification#count.
<3> expected but was
<4>.

 10) Failure:
test_should_the_tracked_action_be_notified_to_person_friends_and_herself(PersonTest)
    [./test/unit/person_test.rb:821:in `test_should_the_tracked_action_be_notified_to_person_friends_and_herself'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<3> expected but was
<1>.

 11) Failure:
test_should_the_tracked_action_notify_friends_with_one_delayed_job_process(PersonTest)
    [/home/joenio/src/noosfero/lib/authenticated_test_helper.rb:43:in `assert_difference'
     ./test/unit/person_test.rb:864:in `test_should_the_tracked_action_notify_friends_with_one_delayed_job_process'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
ActionTrackerNotification#count.
<3> expected but was
<1>.

 12) Failure:
test_should_output_list_with_links_to_recent_documents(RecentDocumentsBlockTest)
    [./test/unit/recent_documents_block_test.rb:28:in `test_should_output_list_with_links_to_recent_documents'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<"<h3 class=\"block-title\"><span>Recent content</span></h3><ul><li><a href=\"http://colivre.net/testinguser/homepage\">homepage</a></li>\n<li><a href=\"http://colivre.net/testinguser/fifth\">fifth</a></li>\n<li><a href=\"http://colivre.net/testinguser/fourth\">fourth</a></li>\n<li><a href=\"http://colivre.net/testinguser/third\">third</a></li>\n<li><a href=\"http://colivre.net/testinguser/second\">second</a></li></ul>"> expected to be =~
</href=.*\/testinguser\/first/>.

 13) Failure:
test_should_respect_the_maximum_number_of_items_as_configured(RecentDocumentsBlockTest)
    [./test/unit/recent_documents_block_test.rb:42:in `test_should_respect_the_maximum_number_of_items_as_configured'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<"<h3 class=\"block-title\"><span>Recent content</span></h3><ul><li><a href=\"http://colivre.net/testinguser/homepage\">homepage</a></li>\n<li><a href=\"http://colivre.net/testinguser/fifth\">fifth</a></li>\n<li><a href=\"http://colivre.net/testinguser/fourth\">fourth</a></li></ul>"> expected to be =~
</href=.*\/testinguser\/third/>.

 14) Failure:
test_should_return_search_results_without_validators_that_are_already_associated_to_the_current_region(RegionTest)
    [./test/test_helper.rb:83:in `assert_includes'
     ./test/unit/region_test.rb:39:in `test_should_return_search_results_without_validators_that_are_already_associated_to_the_current_region'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/joenio/src/noosfero/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<[]> expected to include <#<Organization id: 1076, name: "Organization 2", type: "Organization", identifier: "org2", environment_id: 67, active: true, address: nil, contact_phone: nil, home_page_id: nil, user_id: nil, region_id: nil, data: nil, created_at: nil, lat: nil, lng: nil, geocode_precision: nil, enabled: true, nickname: nil, custom_header: nil, custom_footer: nil, theme: nil, public_profile: true, birth_date: nil, preferred_domain_id: nil, updated_at: nil, visible: true>>.
<false> is not true.

-- JoenioCosta -- 03 Feb 2011

Add comment
You need to login to be able to comment.
 

ActionItemForm edit

Title Not all unit tests are passing in postgresql
ActionItemType? BugItem
Priority 0
Tags colivre
Feature Infrastructure
Plugin
ResponsibleDevelopers Nobody
ScheduledFor? N/A
AffectsVersion?
Status Pending
Ticket SAC:
Topic revision: r12 - 18 Jun 2012 - 16:56:02 - DanielaFeitosa

irc Talk with Devs Now!

 
Translations: English
Search on Docs:
   
ActionItem Search:

Copyright © 2007-2014 by the Noosfero contributors
Colivre - Cooperativa de Tecnologias Livres