Skip to content

Instantly share code, notes, and snippets.

@PatrickHunter
Last active January 1, 2016 20:59
Show Gist options
  • Save PatrickHunter/8200571 to your computer and use it in GitHub Desktop.
Save PatrickHunter/8200571 to your computer and use it in GitHub Desktop.
[vagrant@precise32:/vagrant (master)]$ bundle install
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.2)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Using activesupport (4.0.2)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.2)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.2)
Using actionpack-action_caching (1.0.0)
Using activemodel (4.0.2)
Using active_model_serializers (0.8.1)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.1)
Using activerecord (4.0.2)
Using addressable (2.3.5)
Using airbrake (3.1.2)
Using annotate (2.6.0)
Using handlebars-source (1.1.2)
Using ember-source (1.2.0.1)
Using execjs (2.0.2)
Using barber (0.4.2)
Using coderay (1.1.0)
Using better_errors (1.0.1)
Using debug_inspector (0.0.2)
Using binding_of_caller (0.7.2)
Using bundler (1.3.4)
Using timers (1.1.0)
Using celluloid (0.15.2)
Using certified (0.1.1)
Using connection_pool (1.2.0)
Using daemons (1.1.9)
Using diff-lcs (1.2.4)
Using discourse_plugin (0.0.1) from source at vendor/gems/discourse_plugin
Using email_reply_parser-discourse (0.6)
Using ember-data-source (0.14)
Using thor (0.18.1)
Using railties (4.0.2)
Using jquery-rails (3.0.4)
Using ember-rails (0.14.1)
Using eventmachine (1.0.3)
Using excon (0.28.0)
Using exifr (1.1.3)
Using fabrication (2.8.1)
Using fakeweb (1.3.0)
Using multipart-post (1.2.0)
Using faraday (0.8.8)
Using rake-compiler (0.9.2)
Using fast_blank (0.0.1)
Using fast_stack (0.1.0)
Using fast_xor (1.1.2)
Using fast_xs (0.8.0)
Using fastimage (1.5.2)
Using ffi (1.9.3)
Using flamegraph (0.0.5)
Using formatador (0.2.4)
Using net-ssh (2.7.0)
Using net-scp (1.1.2)
Using mini_portile (0.5.1)
Using nokogiri (1.6.0)
Using ruby-hmac (0.4.0)
Using fog (1.18.0)
Using fspath (2.0.5)
Using sorcerer (1.0.2)
Using given_core (3.1.1)
Using guess_html_encoding (0.0.9)
Using hashie (2.0.5)
Using highline (1.6.20)
Using hike (1.2.3)
Using hiredis (0.4.5)
Using html_truncator (0.3.1)
Using httpauth (0.2.0)
Using ice_cube (0.11.1)
Using image_size (1.1.3)
Using in_threads (1.2.0)
Using progress (3.0.0)
Using image_optim (0.9.1)
Using image_sorcery (1.1.0)
Using json (1.8.1)
Using jwt (0.1.8)
Using kgio (2.8.1)
Using librarian (0.1.1)
Using libv8 (3.16.14.3)
Using listen (0.7.3)
Using lru_redux (0.8.1)
Using redis (3.0.6)
Using message_bus (0.9.3.2)
Using metaclass (0.0.1)
Using method_source (0.8.2)
Using mocha (0.14.0)
Using mock_redis (0.9.0)
Using msgpack (0.5.7)
Using mustache (0.99.4)
Using oauth (0.4.7)
Using oauth2 (0.8.1)
Using oj (2.2.3)
Using omniauth (1.1.4)
Using omniauth-browserid-discourse (0.0.2)
Using omniauth-cas (1.0.4)
Using omniauth-oauth2 (1.1.1)
Using omniauth-facebook (1.4.1)
Using omniauth-github (1.1.1)
Using omniauth-oauth (1.0.1)
Using ruby-openid (2.3.0)
Using rack-openid (1.3.1)
Using omniauth-openid (1.0.1)
Using omniauth-twitter (1.0.1)
Using openid-redis-store (0.0.2)
Using pg (0.15.1)
Using slop (3.4.7)
Using pry (0.9.12.4)
Using pry-nav (0.2.3)
Using pry-rails (0.3.2)
Using puma (2.6.0)
Using qunit-rails (0.0.4)
Using rack-cors (0.2.8)
Installing rack-mini-profiler (0.9.0)
Using rack-protection (1.5.1)
Using tilt (1.4.1)
Using sprockets (2.10.1)
Using sprockets-rails (2.0.1)
Using rails (4.0.2)
Using rails-observers (0.1.2)
Using rails_multisite (0.0.1) from source at vendor/gems/rails_multisite
Using raindrops (0.12.0)
Using rb-fsevent (0.9.3)
Using rb-inotify (0.9.2)
Using trollop (2.0)
Using rbtrace (0.4.1)
Using redcarpet (3.0.0)
Using redis-namespace (1.3.2)
Using ref (1.0.5)
Using rest-client (1.6.7)
Using rinku (1.7.3)
Using rspec-core (2.14.6)
Using rspec-expectations (2.14.3)
Using rspec-mocks (2.14.4)
Using rspec (2.14.1)
Using rspec-given (3.1.1)
Using rspec-rails (2.14.0)
Using ruby-readability (0.5.7)
Using sanitize (2.0.6)
Using sass (3.2.12)
Using sass-rails (4.0.1)
Using seed-fu-discourse (2.2.0)
Using shoulda-context (1.1.5)
Using shoulda-matchers (2.4.0)
Using shoulda (3.5.0)
Using sidekiq (2.15.1)
Using sidekiq-failures (0.2.2)
Using sidetiq (0.4.3)
Using simple-rss (1.3.1)
Using simplecov-html (0.7.1)
Using simplecov (0.7.1)
Using sinatra (1.4.4)
Using temple (0.6.7)
Using slim (2.0.1)
Using spork (1.0.0rc4)
Using spork-rails (4.0.0)
Using therubyracer-discourse (0.12.0)
Using thin (1.6.1)
Using timecop (0.6.3)
Using uglifier (2.3.3)
Using unf_ext (0.0.6)
Using unf (0.1.3)
Using unicorn (4.7.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
[vagrant@precise32:/vagrant (master)]$ rake db:migrate
== Seed from /vagrant/db/fixtures/001_categories.rb
== Seed from /vagrant/db/fixtures/002_groups.rb
== Seed from /vagrant/db/fixtures/003_post_action_types.rb
- PostActionType {:id=>1, :name_key=>"bookmark", :is_flag=>false, :position=>1}
- PostActionType {:id=>2, :name_key=>"like", :is_flag=>false, :icon=>"heart", :position=>2}
- PostActionType {:id=>3, :name_key=>"off_topic", :is_flag=>true, :position=>3}
- PostActionType {:id=>4, :name_key=>"inappropriate", :is_flag=>true, :position=>4}
- PostActionType {:id=>5, :name_key=>"vote", :is_flag=>false, :position=>5}
- PostActionType {:id=>8, :name_key=>"spam", :is_flag=>true, :position=>6}
- PostActionType {:id=>6, :name_key=>"notify_user", :is_flag=>true, :position=>7}
- PostActionType {:id=>7, :name_key=>"notify_moderators", :is_flag=>true, :position=>8}
== Seed from /vagrant/db/fixtures/004_screened_ip_addresses.rb
- ScreenedIpAddress {:id=>1, :ip_address=>"10.0.0.0/8", :action_type=>2}
- ScreenedIpAddress {:id=>2, :ip_address=>"192.168.0.0/16", :action_type=>2}
- ScreenedIpAddress {:id=>3, :ip_address=>"127.0.0.0/8", :action_type=>2}
- ScreenedIpAddress {:id=>4, :ip_address=>"172.16.0.0/12", :action_type=>2}
- ScreenedIpAddress {:id=>5, :ip_address=>"fc00::/7", :action_type=>2}
== Seed from /vagrant/db/fixtures/005_users.rb
- User {:id=>-1, :name=>"system", :username=>"system", :username_lower=>"system", :email=>"no_email", :password=>"c122308d09b2c611c120a25c0a559d4d", :bio_raw=>"Not a real person. A global user for system notifications and other system tasks.", :active=>true, :admin=>true, :moderator=>true, :email_direct=>false, :approved=>true, :email_private_messages=>false}
== Seed from /vagrant/db/fixtures/999_topics.rb
[vagrant@precise32:/vagrant (master)]$ rake db:test:prepare
psql:/vagrant/db/structure.sql:36: WARNING: => is deprecated as an operator name
DETAIL: This name may be disallowed altogether in future versions of PostgreSQL.
[vagrant@precise32:/vagrant (master)]$ rake spec
/usr/local/rvm/rubies/ruby-2.0.0-p0-turbo/bin/ruby -S rspec ./spec/components/admin_user_index_query_spec.rb ./spec/components/archetype_spec.rb ./spec/components/auth/facebook_authenticator_spec.rb ./spec/components/auth/open_id_authenticator_spec.rb ./spec/components/avatar_detector_spec.rb ./spec/components/avatar_lookup_spec.rb ./spec/components/avatar_upload_service_spec.rb ./spec/components/boost_trust_level_spec.rb ./spec/components/cache_spec.rb ./spec/components/category_list_spec.rb ./spec/components/common_passwords/common_passwords_spec.rb ./spec/components/composer_messages_finder_spec.rb ./spec/components/concern/positionable_spec.rb ./spec/components/content_buffer_spec.rb ./spec/components/cooked_post_processor_spec.rb ./spec/components/current_user_spec.rb ./spec/components/directory_helper_spec.rb ./spec/components/discourse_diff_spec.rb ./spec/components/discourse_hub_spec.rb ./spec/components/discourse_plugin_registry_spec.rb ./spec/components/discourse_spec.rb ./spec/components/discourse_updates_spec.rb ./spec/components/distributed_hash_spec.rb ./spec/components/distributed_memoizer_spec.rb ./spec/components/email/email_spec.rb ./spec/components/email/message_builder_spec.rb ./spec/components/email/receiver_spec.rb ./spec/components/email/sender_spec.rb ./spec/components/email/styles_spec.rb ./spec/components/enum_spec.rb ./spec/components/export/export_spec.rb ./spec/components/export/json_encoder_spec.rb ./spec/components/file_store/local_store_spec.rb ./spec/components/file_store/s3_store_spec.rb ./spec/components/filter_best_posts_spec.rb ./spec/components/flag_query_spec.rb ./spec/components/gaps_spec.rb ./spec/components/guardian_spec.rb ./spec/components/image_sizer_spec.rb ./spec/components/import/adapter/base_spec.rb ./spec/components/import/import_spec.rb ./spec/components/import/json_decoder_spec.rb ./spec/components/js_locale_helper_spec.rb ./spec/components/middleware/anonymous_cache_spec.rb ./spec/components/oneboxer/amazon_onebox_spec.rb ./spec/components/oneboxer/android_app_store_onebox_spec.rb ./spec/components/oneboxer/apple_app_onebox_spec.rb ./spec/components/oneboxer/flash_video_onebox_spec.rb ./spec/components/oneboxer/flickr_onebox_spec.rb ./spec/components/oneboxer/gist_onebox_spec.rb ./spec/components/oneboxer/github_commit_onebox_spec.rb ./spec/components/oneboxer/github_pullrequest_onebox_spec.rb ./spec/components/oneboxer/handlebars_onebox_spec.rb ./spec/components/oneboxer/rottentomatoes_onebox_spec.rb ./spec/components/oneboxer/stack_exchange_onebox_spec.rb ./spec/components/oneboxer/twitter_onebox_spec.rb ./spec/components/oneboxer/whitelist_spec.rb ./spec/components/oneboxer/wikipedia_onebox_spec.rb ./spec/components/oneboxer_spec.rb ./spec/components/onpdiff_spec.rb ./spec/components/pbkdf2_spec.rb ./spec/components/pinned_check_spec.rb ./spec/components/plugin/filter_manager_spec.rb ./spec/components/plugin/instance_spec.rb ./spec/components/plugin/metadata_spec.rb ./spec/components/post_creator_spec.rb ./spec/components/post_destroyer_spec.rb ./spec/components/post_revisor_spec.rb ./spec/components/pretty_text_spec.rb ./spec/components/promotion_spec.rb ./spec/components/rate_limiter_spec.rb ./spec/components/redis_store_spec.rb ./spec/components/score_calculator_spec.rb ./spec/components/search_spec.rb ./spec/components/site_setting_extension_spec.rb ./spec/components/site_settings/db_provider_spec.rb ./spec/components/site_settings/local_process_provider_spec.rb ./spec/components/site_settings/yaml_loader_spec.rb ./spec/components/slug_spec.rb ./spec/components/sql_builder_spec.rb ./spec/components/suggested_topics_builder_spec.rb ./spec/components/summarize_spec.rb ./spec/components/system_message_spec.rb ./spec/components/text_cleaner_spec.rb ./spec/components/text_sentinel_spec.rb ./spec/components/topic_creator_spec.rb ./spec/components/topic_query_spec.rb ./spec/components/topic_retriever_spec.rb ./spec/components/topic_view_spec.rb ./spec/components/trashable_spec.rb ./spec/components/unread_spec.rb ./spec/components/url_helper_spec.rb ./spec/components/user_destroyer_spec.rb ./spec/components/user_name_suggester_spec.rb ./spec/components/validators/allowed_ip_address_validator_spec.rb ./spec/components/validators/email_validator_spec.rb ./spec/components/validators/ip_address_format_validator_spec.rb ./spec/components/validators/password_validator_spec.rb ./spec/components/validators/post_validator_spec.rb ./spec/components/validators/quality_title_validator_spec.rb ./spec/components/validators/topic_title_length_validator_spec.rb ./spec/controllers/admin/admin_controller_spec.rb ./spec/controllers/admin/api_controller_spec.rb ./spec/controllers/admin/dashboard_controller_spec.rb ./spec/controllers/admin/email_controller_spec.rb ./spec/controllers/admin/export_controller_spec.rb ./spec/controllers/admin/flags_controller_spec.rb ./spec/controllers/admin/groups_controller_spec.rb ./spec/controllers/admin/impersonate_controller_spec.rb ./spec/controllers/admin/reports_controller_spec.rb ./spec/controllers/admin/screened_emails_controller_spec.rb ./spec/controllers/admin/screened_ip_addresses_controller_spec.rb ./spec/controllers/admin/screened_urls_controller_spec.rb ./spec/controllers/admin/site_content_types_controller_spec.rb ./spec/controllers/admin/site_contents_controller_spec.rb ./spec/controllers/admin/site_customizations_controller_spec.rb ./spec/controllers/admin/site_settings_controller_spec.rb ./spec/controllers/admin/staff_action_logs_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/versions_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/categories_controller_spec.rb ./spec/controllers/clicks_controller_spec.rb ./spec/controllers/composer_messages_controller_spec.rb ./spec/controllers/draft_controller_spec.rb ./spec/controllers/email_controller_spec.rb ./spec/controllers/embed_controller_spec.rb ./spec/controllers/invites_controller_spec.rb ./spec/controllers/list_controller_spec.rb ./spec/controllers/notifications_controller_spec.rb ./spec/controllers/omniauth_callbacks_controller_spec.rb ./spec/controllers/onebox_controller_spec.rb ./spec/controllers/post_actions_controller_spec.rb ./spec/controllers/posts_controller_spec.rb ./spec/controllers/robots_txt_controller_spec.rb ./spec/controllers/search_controller_spec.rb ./spec/controllers/session_controller_spec.rb ./spec/controllers/static_controller_spec.rb ./spec/controllers/topics_controller_spec.rb ./spec/controllers/uploads_controller_spec.rb ./spec/controllers/user_actions_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/integration/same_ip_spammers_spec.rb ./spec/integration/spam_rules_spec.rb ./spec/integration/topic_auto_close_spec.rb ./spec/integrity/i18n_spec.rb ./spec/jobs/close_topic_spec.rb ./spec/jobs/enqueue_digest_emails_spec.rb ./spec/jobs/exporter_spec.rb ./spec/jobs/feature_topic_users_spec.rb ./spec/jobs/importer_spec.rb ./spec/jobs/invite_email_spec.rb ./spec/jobs/jobs_base_spec.rb ./spec/jobs/jobs_spec.rb ./spec/jobs/notify_moved_posts_spec.rb ./spec/jobs/pending_users_reminder_spec.rb ./spec/jobs/periodical_updates_spec.rb ./spec/jobs/poll_feed_spec.rb ./spec/jobs/poll_mailbox_spec.rb ./spec/jobs/process_post_spec.rb ./spec/jobs/send_system_message_spec.rb ./spec/jobs/test_email_spec.rb ./spec/jobs/user_email_spec.rb ./spec/mailers/invite_mailer_spec.rb ./spec/mailers/test_mailer_spec.rb ./spec/mailers/user_notifications_spec.rb ./spec/mailers/version_mailer_spec.rb ./spec/models/admin_dashboard_data_spec.rb ./spec/models/api_key_spec.rb ./spec/models/category_featured_topic_spec.rb ./spec/models/category_featured_user_spec.rb ./spec/models/category_spec.rb ./spec/models/category_user_spec.rb ./spec/models/digest_email_site_setting_spec.rb ./spec/models/draft_sequence_spec.rb ./spec/models/draft_spec.rb ./spec/models/email_log_spec.rb ./spec/models/email_token_spec.rb ./spec/models/error_log_spec.rb ./spec/models/global_setting_spec.rb ./spec/models/group_spec.rb ./spec/models/hot_topic_spec.rb ./spec/models/incoming_link_spec.rb ./spec/models/incoming_links_report_spec.rb ./spec/models/invite_redeemer_spec.rb ./spec/models/invite_spec.rb ./spec/models/locale_site_setting_spec.rb ./spec/models/notification_spec.rb ./spec/models/optimized_image_spec.rb ./spec/models/plugin_store_spec.rb ./spec/models/post_action_spec.rb ./spec/models/post_alert_observer_spec.rb ./spec/models/post_analyzer_spec.rb ./spec/models/post_detail_spec.rb ./spec/models/post_mover_spec.rb ./spec/models/post_reply_spec.rb ./spec/models/post_spec.rb ./spec/models/post_timing_spec.rb ./spec/models/post_upload_spec.rb ./spec/models/report_spec.rb ./spec/models/s3_region_site_setting_spec.rb ./spec/models/screened_email_spec.rb ./spec/models/screened_ip_address_spec.rb ./spec/models/screened_url_spec.rb ./spec/models/site_content_spec.rb ./spec/models/site_customization_spec.rb ./spec/models/site_setting_spec.rb ./spec/models/site_spec.rb ./spec/models/top_menu_item_spec.rb ./spec/models/top_topic_spec.rb ./spec/models/topic_allowed_user_spec.rb ./spec/models/topic_embed_spec.rb ./spec/models/topic_invite_spec.rb ./spec/models/topic_link_click_spec.rb ./spec/models/topic_link_spec.rb ./spec/models/topic_posters_summary_spec.rb ./spec/models/topic_spec.rb ./spec/models/topic_status_update_spec.rb ./spec/models/topic_tracking_state_spec.rb ./spec/models/topic_user_spec.rb ./spec/models/twitter_user_info_spec.rb ./spec/models/upload_spec.rb ./spec/models/user_action_spec.rb ./spec/models/user_email_observer_spec.rb ./spec/models/user_history_spec.rb ./spec/models/user_open_id_spec.rb ./spec/models/user_search_spec.rb ./spec/models/user_spec.rb ./spec/models/user_stat_spec.rb ./spec/models/user_visit_spec.rb ./spec/models/username_validator_spec.rb ./spec/models/view_spec.rb ./spec/serializers/basic_post_serializer_spec.rb ./spec/serializers/post_serializer_spec.rb ./spec/serializers/topic_list_item_serializer_spec.rb ./spec/serializers/user_serializer_spec.rb ./spec/services/auto_block_spec.rb ./spec/services/flag_sockpuppets_spec.rb ./spec/services/group_message_spec.rb ./spec/services/spam_rules_enforcer_spec.rb ./spec/services/staff_action_logger_spec.rb ./spec/services/uri_adapter_spec.rb ./spec/services/user_blocker_spec.rb ./spec/services/user_updater_spec.rb ./spec/services/username_checker_service_spec.rb ./spec/views/omniauth_callbacks/complete.html.erb_spec.rb ./spec/views/omniauth_callbacks/failure.html.erb_spec.rb
Seeding uncategorized category!
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........F....F..............F......F...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.................................................................................................................................................................................................................................................................................................................................................................................................................................................................F........F.F....FF..F.FFFF.FF..F..F......................................................................................FFFF...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Failures:
1) Guardian can_delete? a Category can't be deleted if it is the Uncategorizied Category
Failure/Error: uncategorized_category = Category.find(uncategorized_cat_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/guardian_spec.rb:805:in `block (4 levels) in <top (required)>'
2) ListController indexes allows users to filter on a set of topic ids
Failure/Error: parsed["topic_list"]["topics"].length.should == 1
expected: 1
got: 0 (using ==)
# ./spec/controllers/list_controller_spec.rb:35:in `block (3 levels) in <top (required)>'
3) Topic for_digest returns regular topics
Failure/Error: Topic.for_digest(user, 1.year.ago).should == [topic]
expected: [#<Topic id: 547, title: "This is a test topic 563", last_posted_at: nil, created_at: "2014-01-06 17:51:32", updated_at: "2014-01-06 17:51:32", views: 0, posts_count: 0, user_id: 1107, last_post_user_id: 1107, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:51:32", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-563", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: #<ActiveRecord::Relation []> (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 547, title: "This is a test topic 563", last_posted_at: nil, created_at: "2014-01-06 17:51:32", updated_at: "2014-01-06 17:51:32", views: 0, posts_count: 0, user_id: 1107, last_post_user_id: 1107, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:51:32", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-563", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/models/topic_spec.rb:1204:in `block (3 levels) in <top (required)>'
4) Topic similar_to with a similar topic returns the similar topic if the title is similar
Failure/Error: Topic.similar_to("has evil trout made any topics?", "i am wondering has evil trout made any topics?").should == [topic]
expected: [#<Topic id: 550, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2014-01-06 17:51:33", updated_at: "2014-01-06 17:51:33", views: 0, posts_count: 0, user_id: 1111, last_post_user_id: 1111, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:51:33", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "evil-trout-is-the-dude-who-posted-this-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: #<ActiveRecord::Relation []> (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 550, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2014-01-06 17:51:33", updated_at: "2014-01-06 17:51:33", views: 0, posts_count: 0, user_id: 1111, last_post_user_id: 1111, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:51:33", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "evil-trout-is-the-dude-who-posted-this-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/models/topic_spec.rb:224:in `block (4 levels) in <top (required)>'
5) Topic revisions changing category removing a category creates a new revision
Failure/Error: topic.revisions.size.should == 3
expected: 3
got: 2 (using ==)
# ./spec/models/topic_spec.rb:774:in `block (5 levels) in <top (required)>'
6) Topic change_category without a previous category should not change the topic_count when not changed
Failure/Error: lambda { @topic.change_category(@topic.category.name); @category.reload }.should_not change(@category, :topic_count)
NoMethodError:
undefined method `name' for nil:NilClass
# ./spec/models/topic_spec.rb:804:in `block (5 levels) in <top (required)>'
# ./spec/models/topic_spec.rb:804:in `block (4 levels) in <top (required)>'
7) Topic change_category with a previous category when the category exists resets the category
Failure/Error: @topic.category_id.should == SiteSetting.uncategorized_category_id
expected: -1
got: 59 (using ==)
# ./spec/models/topic_spec.rb:883:in `block (5 levels) in <top (required)>'
8) TopicTrackingState correctly gets the tracking state
Failure/Error: report.length.should == 1
expected: 1
got: 0 (using ==)
# ./spec/models/topic_tracking_state_spec.rb:27:in `block (2 levels) in <top (required)>'
9) TopicQuery a bunch of topics list_latest returns the topics in the correct order
Failure/Error: topics.map(&:id).should == [pinned_topic, closed_topic, archived_topic, regular_topic].map(&:id)
expected: [1072, 1075, 1073, 1071]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:129:in `block (4 levels) in <top (required)>'
10) TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top
Failure/Error: topics.should == [closed_topic, archived_topic, pinned_topic, regular_topic]
expected: [#<Topic id: 1120, title: "This is a closed topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 2, posts_count: 1, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 1, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: true, archived: false, bumped_at: "2014-01-06 17:52:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-closed-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 2, word_count: nil>, #<Topic id: 1118, title: "This is an archived topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 50, posts_count: 4, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 30, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: true, bumped_at: "2014-01-06 17:47:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-an-archived-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 1117, title: "This is a pinned topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 10, posts_count: 5, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 100, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:43:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: "2014-01-06 17:43:54", score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-pinned-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 12, word_count: nil>, #<Topic id: 1116, title: "This is a regular topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 100, posts_count: 3, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 66, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:38:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-regular-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 11, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,5 +1,2 @@
-[#<Topic id: 1120, title: "This is a closed topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 2, posts_count: 1, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 1, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: true, archived: false, bumped_at: "2014-01-06 17:52:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-closed-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 2, word_count: nil>,
- #<Topic id: 1118, title: "This is an archived topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 50, posts_count: 4, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 30, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: true, bumped_at: "2014-01-06 17:47:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-an-archived-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>,
- #<Topic id: 1117, title: "This is a pinned topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 10, posts_count: 5, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 100, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:43:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: "2014-01-06 17:43:54", score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-pinned-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 12, word_count: nil>,
- #<Topic id: 1116, title: "This is a regular topic", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 100, posts_count: 3, user_id: 2170, last_post_user_id: 2170, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 66, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:38:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-regular-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 11, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:188:in `block (4 levels) in <top (required)>'
11) TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited
Failure/Error: topic_query.list_favorited.topics.should == [topic]
expected: [#<Topic id: 1121, title: "This is a test topic 992", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 0, posts_count: 0, user_id: 2173, last_post_user_id: 2173, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:53:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-992", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1121, title: "This is a test topic 992", last_posted_at: nil, created_at: "2014-01-06 17:53:54", updated_at: "2014-01-06 17:53:54", views: 0, posts_count: 0, user_id: 2173, last_post_user_id: 2173, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:53:54", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-992", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:274:in `block (4 levels) in <top (required)>'
12) TopicQuery list_posted created topics includes the created topic
Failure/Error: topics.include?(created_topic).should be_true
expected: true value
got: false
# ./spec/components/topic_query_spec.rb:339:in `block (4 levels) in <top (required)>'
13) TopicQuery list_posted topic you've posted in includes the posted topic
Failure/Error: topics.include?(other_users_topic).should be_true
expected: true value
got: false
# ./spec/components/topic_query_spec.rb:348:in `block (4 levels) in <top (required)>'
14) TopicQuery suggested_for anonymously browswing with invisible, closed and archived should omit the closed/archived/invisbiel topics from suggested
Failure/Error: TopicQuery.new.list_suggested_for(topic).topics.should == [regular_topic]
expected: [#<Topic id: 1139, title: "This is a test topic 1000", last_posted_at: nil, created_at: "2014-01-06 17:53:57", updated_at: "2014-01-06 17:53:57", views: 0, posts_count: 0, user_id: 2199, last_post_user_id: 2199, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:53:57", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1000", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1139, title: "This is a test topic 1000", last_posted_at: nil, created_at: "2014-01-06 17:53:57", updated_at: "2014-01-06 17:53:57", views: 0, posts_count: 0, user_id: 2199, last_post_user_id: 2199, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:53:57", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1000", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:373:in `block (4 levels) in <top (required)>'
15) TopicQuery suggested_for when logged in with some existing topics won't fully read if there are enough partially read topics and new topics
Failure/Error: suggested_topics.should == [partially_read.id, new_topic.id]
expected: [1144, 1145]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:408:in `block (5 levels) in <top (required)>'
16) TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random
Failure/Error: suggested_topics.should == [partially_read.id, new_topic.id, fully_read.id]
expected: [1151, 1152, 1153]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:413:in `block (5 levels) in <top (required)>'
17) TopicQuery suggested_for when logged in with some existing topics won't return new or fully read if there are enough partially read topics
Failure/Error: suggested_topics.should == [partially_read.id]
expected: [1158]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:403:in `block (5 levels) in <top (required)>'
18) TopicQuery suggested_for when anonymous should return the new topic
Failure/Error: TopicQuery.new.list_suggested_for(topic).topics.should == [new_topic]
expected: [#<Topic id: 1165, title: "This is a test topic 1026", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2211, last_post_user_id: 2211, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1026", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1165, title: "This is a test topic 1026", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2211, last_post_user_id: 2211, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1026", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:361:in `block (4 levels) in <top (required)>'
19) TopicQuery unread / read topics with read data user with auto_track_topics list_unread only contains the partially read topic
Failure/Error: topic_query.list_unread.topics.should == [partially_read]
expected: [#<Topic id: 1167, title: "This is a test topic 1028", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2214, last_post_user_id: 2214, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1028", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1167, title: "This is a test topic 1028", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2214, last_post_user_id: 2214, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1028", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:246:in `block (5 levels) in <top (required)>'
20) TopicQuery unread / read topics with read data list_read contain both topics
Failure/Error: topic_query.list_read.topics.should =~ [fully_read, partially_read]
expected collection contained: [#<Topic id: 1169, title: "This is a test topic 1030", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2216, last_post_user_id: 2216, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1030", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 1170, title: "This is a test topic 1031", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2216, last_post_user_id: 2216, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1031", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
actual collection contained: []
the missing elements were: [#<Topic id: 1169, title: "This is a test topic 1030", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2216, last_post_user_id: 2216, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1030", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 1170, title: "This is a test topic 1031", last_posted_at: nil, created_at: "2014-01-06 17:54:00", updated_at: "2014-01-06 17:54:00", views: 0, posts_count: 0, user_id: 2216, last_post_user_id: 2216, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:54:00", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1031", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
# ./spec/components/topic_query_spec.rb:252:in `block (5 levels) in <top (required)>'
21) TopicQuery list_new with a new topic contains the new topic
Failure/Error: topics.should == [new_topic]
expected: [#<Topic id: 1173, title: "This is a test topic 1034", last_posted_at: nil, created_at: "2014-01-06 17:54:01", updated_at: "2014-01-06 17:54:01", views: 0, posts_count: 0, user_id: 2221, last_post_user_id: 2221, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:44:01", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1034", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1173, title: "This is a test topic 1034", last_posted_at: nil, created_at: "2014-01-06 17:54:01", updated_at: "2014-01-06 17:54:01", views: 0, posts_count: 0, user_id: 2221, last_post_user_id: 2221, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:44:01", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1034", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:294:in `block (4 levels) in <top (required)>'
22) TopicQuery list_new with a new topic muted topics un-muted returns the topic again
Failure/Error: topics.should == [new_topic]
expected: [#<Topic id: 1176, title: "This is a test topic 1037", last_posted_at: nil, created_at: "2014-01-06 17:54:01", updated_at: "2014-01-06 17:54:01", views: 0, posts_count: 0, user_id: 2227, last_post_user_id: 2227, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:44:01", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1037", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1176, title: "This is a test topic 1037", last_posted_at: nil, created_at: "2014-01-06 17:54:01", updated_at: "2014-01-06 17:54:01", views: 0, posts_count: 0, user_id: 2227, last_post_user_id: 2227, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 17:44:01", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-1037", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:320:in `block (6 levels) in <top (required)>'
23) CategoryList category order returns default order categories
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
24) CategoryList category order handles duplicate position values
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
25) CategoryList category order returns topics in specified order
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
26) CategoryList category order default always at the end
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
Finished in 5 minutes 6 seconds
3359 examples, 26 failures
Failed examples:
rspec ./spec/components/guardian_spec.rb:803 # Guardian can_delete? a Category can't be deleted if it is the Uncategorizied Category
rspec ./spec/controllers/list_controller_spec.rb:29 # ListController indexes allows users to filter on a set of topic ids
rspec ./spec/models/topic_spec.rb:1202 # Topic for_digest returns regular topics
rspec ./spec/models/topic_spec.rb:223 # Topic similar_to with a similar topic returns the similar topic if the title is similar
rspec ./spec/models/topic_spec.rb:773 # Topic revisions changing category removing a category creates a new revision
rspec ./spec/models/topic_spec.rb:803 # Topic change_category without a previous category should not change the topic_count when not changed
rspec ./spec/models/topic_spec.rb:882 # Topic change_category with a previous category when the category exists resets the category
rspec ./spec/models/topic_tracking_state_spec.rb:18 # TopicTrackingState correctly gets the tracking state
rspec ./spec/components/topic_query_spec.rb:128 # TopicQuery a bunch of topics list_latest returns the topics in the correct order
rspec ./spec/components/topic_query_spec.rb:187 # TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top
rspec ./spec/components/topic_query_spec.rb:273 # TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited
rspec ./spec/components/topic_query_spec.rb:338 # TopicQuery list_posted created topics includes the created topic
rspec ./spec/components/topic_query_spec.rb:347 # TopicQuery list_posted topic you've posted in includes the posted topic
rspec ./spec/components/topic_query_spec.rb:372 # TopicQuery suggested_for anonymously browswing with invisible, closed and archived should omit the closed/archived/invisbiel topics from suggested
rspec ./spec/components/topic_query_spec.rb:406 # TopicQuery suggested_for when logged in with some existing topics won't fully read if there are enough partially read topics and new topics
rspec ./spec/components/topic_query_spec.rb:411 # TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random
rspec ./spec/components/topic_query_spec.rb:401 # TopicQuery suggested_for when logged in with some existing topics won't return new or fully read if there are enough partially read topics
rspec ./spec/components/topic_query_spec.rb:360 # TopicQuery suggested_for when anonymous should return the new topic
rspec ./spec/components/topic_query_spec.rb:245 # TopicQuery unread / read topics with read data user with auto_track_topics list_unread only contains the partially read topic
rspec ./spec/components/topic_query_spec.rb:251 # TopicQuery unread / read topics with read data list_read contain both topics
rspec ./spec/components/topic_query_spec.rb:293 # TopicQuery list_new with a new topic contains the new topic
rspec ./spec/components/topic_query_spec.rb:319 # TopicQuery list_new with a new topic muted topics un-muted returns the topic again
rspec ./spec/components/category_list_spec.rb:89 # CategoryList category order returns default order categories
rspec ./spec/components/category_list_spec.rb:100 # CategoryList category order handles duplicate position values
rspec ./spec/components/category_list_spec.rb:84 # CategoryList category order returns topics in specified order
rspec ./spec/components/category_list_spec.rb:95 # CategoryList category order default always at the end
Randomized with seed 14622
/usr/local/rvm/rubies/ruby-2.0.0-p0-turbo/bin/ruby -S rspec ./spec/components/admin_user_index_query_spec.rb ./spec/components/archetype_spec.rb ./spec/components/auth/facebook_authenticator_spec.rb ./spec/components/auth/open_id_authenticator_spec.rb ./spec/components/avatar_detector_spec.rb ./spec/components/avatar_lookup_spec.rb ./spec/components/avatar_upload_service_spec.rb ./spec/components/boost_trust_level_spec.rb ./spec/components/cache_spec.rb ./spec/components/category_list_spec.rb ./spec/components/common_passwords/common_passwords_spec.rb ./spec/components/composer_messages_finder_spec.rb ./spec/components/concern/positionable_spec.rb ./spec/components/content_buffer_spec.rb ./spec/components/cooked_post_processor_spec.rb ./spec/components/current_user_spec.rb ./spec/components/directory_helper_spec.rb ./spec/components/discourse_diff_spec.rb ./spec/components/discourse_hub_spec.rb ./spec/components/discourse_plugin_registry_spec.rb ./spec/components/discourse_spec.rb ./spec/components/discourse_updates_spec.rb ./spec/components/distributed_hash_spec.rb ./spec/components/distributed_memoizer_spec.rb ./spec/components/email/email_spec.rb ./spec/components/email/message_builder_spec.rb ./spec/components/email/receiver_spec.rb ./spec/components/email/sender_spec.rb ./spec/components/email/styles_spec.rb ./spec/components/enum_spec.rb ./spec/components/export/export_spec.rb ./spec/components/export/json_encoder_spec.rb ./spec/components/file_store/local_store_spec.rb ./spec/components/file_store/s3_store_spec.rb ./spec/components/filter_best_posts_spec.rb ./spec/components/flag_query_spec.rb ./spec/components/gaps_spec.rb ./spec/components/guardian_spec.rb ./spec/components/image_sizer_spec.rb ./spec/components/import/adapter/base_spec.rb ./spec/components/import/import_spec.rb ./spec/components/import/json_decoder_spec.rb ./spec/components/js_locale_helper_spec.rb ./spec/components/middleware/anonymous_cache_spec.rb ./spec/components/oneboxer/amazon_onebox_spec.rb ./spec/components/oneboxer/android_app_store_onebox_spec.rb ./spec/components/oneboxer/apple_app_onebox_spec.rb ./spec/components/oneboxer/flash_video_onebox_spec.rb ./spec/components/oneboxer/flickr_onebox_spec.rb ./spec/components/oneboxer/gist_onebox_spec.rb ./spec/components/oneboxer/github_commit_onebox_spec.rb ./spec/components/oneboxer/github_pullrequest_onebox_spec.rb ./spec/components/oneboxer/handlebars_onebox_spec.rb ./spec/components/oneboxer/rottentomatoes_onebox_spec.rb ./spec/components/oneboxer/stack_exchange_onebox_spec.rb ./spec/components/oneboxer/twitter_onebox_spec.rb ./spec/components/oneboxer/whitelist_spec.rb ./spec/components/oneboxer/wikipedia_onebox_spec.rb ./spec/components/oneboxer_spec.rb ./spec/components/onpdiff_spec.rb ./spec/components/pbkdf2_spec.rb ./spec/components/pinned_check_spec.rb ./spec/components/plugin/filter_manager_spec.rb ./spec/components/plugin/instance_spec.rb ./spec/components/plugin/metadata_spec.rb ./spec/components/post_creator_spec.rb ./spec/components/post_destroyer_spec.rb ./spec/components/post_revisor_spec.rb ./spec/components/pretty_text_spec.rb ./spec/components/promotion_spec.rb ./spec/components/rate_limiter_spec.rb ./spec/components/redis_store_spec.rb ./spec/components/score_calculator_spec.rb ./spec/components/search_spec.rb ./spec/components/site_setting_extension_spec.rb ./spec/components/site_settings/db_provider_spec.rb ./spec/components/site_settings/local_process_provider_spec.rb ./spec/components/site_settings/yaml_loader_spec.rb ./spec/components/slug_spec.rb ./spec/components/sql_builder_spec.rb ./spec/components/suggested_topics_builder_spec.rb ./spec/components/summarize_spec.rb ./spec/components/system_message_spec.rb ./spec/components/text_cleaner_spec.rb ./spec/components/text_sentinel_spec.rb ./spec/components/topic_creator_spec.rb ./spec/components/topic_query_spec.rb ./spec/components/topic_retriever_spec.rb ./spec/components/topic_view_spec.rb ./spec/components/trashable_spec.rb ./spec/components/unread_spec.rb ./spec/components/url_helper_spec.rb ./spec/components/user_destroyer_spec.rb ./spec/components/user_name_suggester_spec.rb ./spec/components/validators/allowed_ip_address_validator_spec.rb ./spec/components/validators/email_validator_spec.rb ./spec/components/validators/ip_address_format_validator_spec.rb ./spec/components/validators/password_validator_spec.rb ./spec/components/validators/post_validator_spec.rb ./spec/components/validators/quality_title_validator_spec.rb ./spec/components/validators/topic_title_length_validator_spec.rb ./spec/controllers/admin/admin_controller_spec.rb ./spec/controllers/admin/api_controller_spec.rb ./spec/controllers/admin/dashboard_controller_spec.rb ./spec/controllers/admin/email_controller_spec.rb ./spec/controllers/admin/export_controller_spec.rb ./spec/controllers/admin/flags_controller_spec.rb ./spec/controllers/admin/groups_controller_spec.rb ./spec/controllers/admin/impersonate_controller_spec.rb ./spec/controllers/admin/reports_controller_spec.rb ./spec/controllers/admin/screened_emails_controller_spec.rb ./spec/controllers/admin/screened_ip_addresses_controller_spec.rb ./spec/controllers/admin/screened_urls_controller_spec.rb ./spec/controllers/admin/site_content_types_controller_spec.rb ./spec/controllers/admin/site_contents_controller_spec.rb ./spec/controllers/admin/site_customizations_controller_spec.rb ./spec/controllers/admin/site_settings_controller_spec.rb ./spec/controllers/admin/staff_action_logs_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/versions_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/categories_controller_spec.rb ./spec/controllers/clicks_controller_spec.rb ./spec/controllers/composer_messages_controller_spec.rb ./spec/controllers/draft_controller_spec.rb ./spec/controllers/email_controller_spec.rb ./spec/controllers/embed_controller_spec.rb ./spec/controllers/invites_controller_spec.rb ./spec/controllers/list_controller_spec.rb ./spec/controllers/notifications_controller_spec.rb ./spec/controllers/omniauth_callbacks_controller_spec.rb ./spec/controllers/onebox_controller_spec.rb ./spec/controllers/post_actions_controller_spec.rb ./spec/controllers/posts_controller_spec.rb ./spec/controllers/robots_txt_controller_spec.rb ./spec/controllers/search_controller_spec.rb ./spec/controllers/session_controller_spec.rb ./spec/controllers/static_controller_spec.rb ./spec/controllers/topics_controller_spec.rb ./spec/controllers/uploads_controller_spec.rb ./spec/controllers/user_actions_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/integration/same_ip_spammers_spec.rb ./spec/integration/spam_rules_spec.rb ./spec/integration/topic_auto_close_spec.rb ./spec/integrity/i18n_spec.rb ./spec/jobs/close_topic_spec.rb ./spec/jobs/enqueue_digest_emails_spec.rb ./spec/jobs/exporter_spec.rb ./spec/jobs/feature_topic_users_spec.rb ./spec/jobs/importer_spec.rb ./spec/jobs/invite_email_spec.rb ./spec/jobs/jobs_base_spec.rb ./spec/jobs/jobs_spec.rb ./spec/jobs/notify_moved_posts_spec.rb ./spec/jobs/pending_users_reminder_spec.rb ./spec/jobs/periodical_updates_spec.rb ./spec/jobs/poll_feed_spec.rb ./spec/jobs/poll_mailbox_spec.rb ./spec/jobs/process_post_spec.rb ./spec/jobs/send_system_message_spec.rb ./spec/jobs/test_email_spec.rb ./spec/jobs/user_email_spec.rb ./spec/mailers/invite_mailer_spec.rb ./spec/mailers/test_mailer_spec.rb ./spec/mailers/user_notifications_spec.rb ./spec/mailers/version_mailer_spec.rb ./spec/models/admin_dashboard_data_spec.rb ./spec/models/api_key_spec.rb ./spec/models/category_featured_topic_spec.rb ./spec/models/category_featured_user_spec.rb ./spec/models/category_spec.rb ./spec/models/category_user_spec.rb ./spec/models/digest_email_site_setting_spec.rb ./spec/models/draft_sequence_spec.rb ./spec/models/draft_spec.rb ./spec/models/email_log_spec.rb ./spec/models/email_token_spec.rb ./spec/models/error_log_spec.rb ./spec/models/global_setting_spec.rb ./spec/models/group_spec.rb ./spec/models/hot_topic_spec.rb ./spec/models/incoming_link_spec.rb ./spec/models/incoming_links_report_spec.rb ./spec/models/invite_redeemer_spec.rb ./spec/models/invite_spec.rb ./spec/models/locale_site_setting_spec.rb ./spec/models/notification_spec.rb ./spec/models/optimized_image_spec.rb ./spec/models/plugin_store_spec.rb ./spec/models/post_action_spec.rb ./spec/models/post_alert_observer_spec.rb ./spec/models/post_analyzer_spec.rb ./spec/models/post_detail_spec.rb ./spec/models/post_mover_spec.rb ./spec/models/post_reply_spec.rb ./spec/models/post_spec.rb ./spec/models/post_timing_spec.rb ./spec/models/post_upload_spec.rb ./spec/models/report_spec.rb ./spec/models/s3_region_site_setting_spec.rb ./spec/models/screened_email_spec.rb ./spec/models/screened_ip_address_spec.rb ./spec/models/screened_url_spec.rb ./spec/models/site_content_spec.rb ./spec/models/site_customization_spec.rb ./spec/models/site_setting_spec.rb ./spec/models/site_spec.rb ./spec/models/top_menu_item_spec.rb ./spec/models/top_topic_spec.rb ./spec/models/topic_allowed_user_spec.rb ./spec/models/topic_embed_spec.rb ./spec/models/topic_invite_spec.rb ./spec/models/topic_link_click_spec.rb ./spec/models/topic_link_spec.rb ./spec/models/topic_posters_summary_spec.rb ./spec/models/topic_spec.rb ./spec/models/topic_status_update_spec.rb ./spec/models/topic_tracking_state_spec.rb ./spec/models/topic_user_spec.rb ./spec/models/twitter_user_info_spec.rb ./spec/models/upload_spec.rb ./spec/models/user_action_spec.rb ./spec/models/user_email_observer_spec.rb ./spec/models/user_history_spec.rb ./spec/models/user_open_id_spec.rb ./spec/models/user_search_spec.rb ./spec/models/user_spec.rb ./spec/models/user_stat_spec.rb ./spec/models/user_visit_spec.rb ./spec/models/username_validator_spec.rb ./spec/models/view_spec.rb ./spec/serializers/basic_post_serializer_spec.rb ./spec/serializers/post_serializer_spec.rb ./spec/serializers/topic_list_item_serializer_spec.rb ./spec/serializers/user_serializer_spec.rb ./spec/services/auto_block_spec.rb ./spec/services/flag_sockpuppets_spec.rb ./spec/services/group_message_spec.rb ./spec/services/spam_rules_enforcer_spec.rb ./spec/services/staff_action_logger_spec.rb ./spec/services/uri_adapter_spec.rb ./spec/services/user_blocker_spec.rb ./spec/services/user_updater_spec.rb ./spec/services/username_checker_service_spec.rb ./spec/views/omniauth_callbacks/complete.html.erb_spec.rb ./spec/views/omniauth_callbacks/failure.html.erb_spec.rb failed
[vagrant@precise32:/vagrant (master)]$ rake spec
/usr/local/rvm/rubies/ruby-2.0.0-p0-turbo/bin/ruby -S rspec ./spec/components/admin_user_index_query_spec.rb ./spec/components/archetype_spec.rb ./spec/components/auth/facebook_authenticator_spec.rb ./spec/components/auth/open_id_authenticator_spec.rb ./spec/components/avatar_detector_spec.rb ./spec/components/avatar_lookup_spec.rb ./spec/components/avatar_upload_service_spec.rb ./spec/components/boost_trust_level_spec.rb ./spec/components/cache_spec.rb ./spec/components/category_list_spec.rb ./spec/components/common_passwords/common_passwords_spec.rb ./spec/components/composer_messages_finder_spec.rb ./spec/components/concern/positionable_spec.rb ./spec/components/content_buffer_spec.rb ./spec/components/cooked_post_processor_spec.rb ./spec/components/current_user_spec.rb ./spec/components/directory_helper_spec.rb ./spec/components/discourse_diff_spec.rb ./spec/components/discourse_hub_spec.rb ./spec/components/discourse_plugin_registry_spec.rb ./spec/components/discourse_spec.rb ./spec/components/discourse_updates_spec.rb ./spec/components/distributed_hash_spec.rb ./spec/components/distributed_memoizer_spec.rb ./spec/components/email/email_spec.rb ./spec/components/email/message_builder_spec.rb ./spec/components/email/receiver_spec.rb ./spec/components/email/sender_spec.rb ./spec/components/email/styles_spec.rb ./spec/components/enum_spec.rb ./spec/components/export/export_spec.rb ./spec/components/export/json_encoder_spec.rb ./spec/components/file_store/local_store_spec.rb ./spec/components/file_store/s3_store_spec.rb ./spec/components/filter_best_posts_spec.rb ./spec/components/flag_query_spec.rb ./spec/components/gaps_spec.rb ./spec/components/guardian_spec.rb ./spec/components/image_sizer_spec.rb ./spec/components/import/adapter/base_spec.rb ./spec/components/import/import_spec.rb ./spec/components/import/json_decoder_spec.rb ./spec/components/js_locale_helper_spec.rb ./spec/components/middleware/anonymous_cache_spec.rb ./spec/components/oneboxer/amazon_onebox_spec.rb ./spec/components/oneboxer/android_app_store_onebox_spec.rb ./spec/components/oneboxer/apple_app_onebox_spec.rb ./spec/components/oneboxer/flash_video_onebox_spec.rb ./spec/components/oneboxer/flickr_onebox_spec.rb ./spec/components/oneboxer/gist_onebox_spec.rb ./spec/components/oneboxer/github_commit_onebox_spec.rb ./spec/components/oneboxer/github_pullrequest_onebox_spec.rb ./spec/components/oneboxer/handlebars_onebox_spec.rb ./spec/components/oneboxer/rottentomatoes_onebox_spec.rb ./spec/components/oneboxer/stack_exchange_onebox_spec.rb ./spec/components/oneboxer/twitter_onebox_spec.rb ./spec/components/oneboxer/whitelist_spec.rb ./spec/components/oneboxer/wikipedia_onebox_spec.rb ./spec/components/oneboxer_spec.rb ./spec/components/onpdiff_spec.rb ./spec/components/pbkdf2_spec.rb ./spec/components/pinned_check_spec.rb ./spec/components/plugin/filter_manager_spec.rb ./spec/components/plugin/instance_spec.rb ./spec/components/plugin/metadata_spec.rb ./spec/components/post_creator_spec.rb ./spec/components/post_destroyer_spec.rb ./spec/components/post_revisor_spec.rb ./spec/components/pretty_text_spec.rb ./spec/components/promotion_spec.rb ./spec/components/rate_limiter_spec.rb ./spec/components/redis_store_spec.rb ./spec/components/score_calculator_spec.rb ./spec/components/search_spec.rb ./spec/components/site_setting_extension_spec.rb ./spec/components/site_settings/db_provider_spec.rb ./spec/components/site_settings/local_process_provider_spec.rb ./spec/components/site_settings/yaml_loader_spec.rb ./spec/components/slug_spec.rb ./spec/components/sql_builder_spec.rb ./spec/components/suggested_topics_builder_spec.rb ./spec/components/summarize_spec.rb ./spec/components/system_message_spec.rb ./spec/components/text_cleaner_spec.rb ./spec/components/text_sentinel_spec.rb ./spec/components/topic_creator_spec.rb ./spec/components/topic_query_spec.rb ./spec/components/topic_retriever_spec.rb ./spec/components/topic_view_spec.rb ./spec/components/trashable_spec.rb ./spec/components/unread_spec.rb ./spec/components/url_helper_spec.rb ./spec/components/user_destroyer_spec.rb ./spec/components/user_name_suggester_spec.rb ./spec/components/validators/allowed_ip_address_validator_spec.rb ./spec/components/validators/email_validator_spec.rb ./spec/components/validators/ip_address_format_validator_spec.rb ./spec/components/validators/password_validator_spec.rb ./spec/components/validators/post_validator_spec.rb ./spec/components/validators/quality_title_validator_spec.rb ./spec/components/validators/topic_title_length_validator_spec.rb ./spec/controllers/admin/admin_controller_spec.rb ./spec/controllers/admin/api_controller_spec.rb ./spec/controllers/admin/dashboard_controller_spec.rb ./spec/controllers/admin/email_controller_spec.rb ./spec/controllers/admin/export_controller_spec.rb ./spec/controllers/admin/flags_controller_spec.rb ./spec/controllers/admin/groups_controller_spec.rb ./spec/controllers/admin/impersonate_controller_spec.rb ./spec/controllers/admin/reports_controller_spec.rb ./spec/controllers/admin/screened_emails_controller_spec.rb ./spec/controllers/admin/screened_ip_addresses_controller_spec.rb ./spec/controllers/admin/screened_urls_controller_spec.rb ./spec/controllers/admin/site_content_types_controller_spec.rb ./spec/controllers/admin/site_contents_controller_spec.rb ./spec/controllers/admin/site_customizations_controller_spec.rb ./spec/controllers/admin/site_settings_controller_spec.rb ./spec/controllers/admin/staff_action_logs_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/versions_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/categories_controller_spec.rb ./spec/controllers/clicks_controller_spec.rb ./spec/controllers/composer_messages_controller_spec.rb ./spec/controllers/draft_controller_spec.rb ./spec/controllers/email_controller_spec.rb ./spec/controllers/embed_controller_spec.rb ./spec/controllers/invites_controller_spec.rb ./spec/controllers/list_controller_spec.rb ./spec/controllers/notifications_controller_spec.rb ./spec/controllers/omniauth_callbacks_controller_spec.rb ./spec/controllers/onebox_controller_spec.rb ./spec/controllers/post_actions_controller_spec.rb ./spec/controllers/posts_controller_spec.rb ./spec/controllers/robots_txt_controller_spec.rb ./spec/controllers/search_controller_spec.rb ./spec/controllers/session_controller_spec.rb ./spec/controllers/static_controller_spec.rb ./spec/controllers/topics_controller_spec.rb ./spec/controllers/uploads_controller_spec.rb ./spec/controllers/user_actions_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/integration/same_ip_spammers_spec.rb ./spec/integration/spam_rules_spec.rb ./spec/integration/topic_auto_close_spec.rb ./spec/integrity/i18n_spec.rb ./spec/jobs/close_topic_spec.rb ./spec/jobs/enqueue_digest_emails_spec.rb ./spec/jobs/exporter_spec.rb ./spec/jobs/feature_topic_users_spec.rb ./spec/jobs/importer_spec.rb ./spec/jobs/invite_email_spec.rb ./spec/jobs/jobs_base_spec.rb ./spec/jobs/jobs_spec.rb ./spec/jobs/notify_moved_posts_spec.rb ./spec/jobs/pending_users_reminder_spec.rb ./spec/jobs/periodical_updates_spec.rb ./spec/jobs/poll_feed_spec.rb ./spec/jobs/poll_mailbox_spec.rb ./spec/jobs/process_post_spec.rb ./spec/jobs/send_system_message_spec.rb ./spec/jobs/test_email_spec.rb ./spec/jobs/user_email_spec.rb ./spec/mailers/invite_mailer_spec.rb ./spec/mailers/test_mailer_spec.rb ./spec/mailers/user_notifications_spec.rb ./spec/mailers/version_mailer_spec.rb ./spec/models/admin_dashboard_data_spec.rb ./spec/models/api_key_spec.rb ./spec/models/category_featured_topic_spec.rb ./spec/models/category_featured_user_spec.rb ./spec/models/category_spec.rb ./spec/models/category_user_spec.rb ./spec/models/digest_email_site_setting_spec.rb ./spec/models/draft_sequence_spec.rb ./spec/models/draft_spec.rb ./spec/models/email_log_spec.rb ./spec/models/email_token_spec.rb ./spec/models/error_log_spec.rb ./spec/models/global_setting_spec.rb ./spec/models/group_spec.rb ./spec/models/hot_topic_spec.rb ./spec/models/incoming_link_spec.rb ./spec/models/incoming_links_report_spec.rb ./spec/models/invite_redeemer_spec.rb ./spec/models/invite_spec.rb ./spec/models/locale_site_setting_spec.rb ./spec/models/notification_spec.rb ./spec/models/optimized_image_spec.rb ./spec/models/plugin_store_spec.rb ./spec/models/post_action_spec.rb ./spec/models/post_alert_observer_spec.rb ./spec/models/post_analyzer_spec.rb ./spec/models/post_detail_spec.rb ./spec/models/post_mover_spec.rb ./spec/models/post_reply_spec.rb ./spec/models/post_spec.rb ./spec/models/post_timing_spec.rb ./spec/models/post_upload_spec.rb ./spec/models/report_spec.rb ./spec/models/s3_region_site_setting_spec.rb ./spec/models/screened_email_spec.rb ./spec/models/screened_ip_address_spec.rb ./spec/models/screened_url_spec.rb ./spec/models/site_content_spec.rb ./spec/models/site_customization_spec.rb ./spec/models/site_setting_spec.rb ./spec/models/site_spec.rb ./spec/models/top_menu_item_spec.rb ./spec/models/top_topic_spec.rb ./spec/models/topic_allowed_user_spec.rb ./spec/models/topic_embed_spec.rb ./spec/models/topic_invite_spec.rb ./spec/models/topic_link_click_spec.rb ./spec/models/topic_link_spec.rb ./spec/models/topic_posters_summary_spec.rb ./spec/models/topic_spec.rb ./spec/models/topic_status_update_spec.rb ./spec/models/topic_tracking_state_spec.rb ./spec/models/topic_user_spec.rb ./spec/models/twitter_user_info_spec.rb ./spec/models/upload_spec.rb ./spec/models/user_action_spec.rb ./spec/models/user_email_observer_spec.rb ./spec/models/user_history_spec.rb ./spec/models/user_open_id_spec.rb ./spec/models/user_search_spec.rb ./spec/models/user_spec.rb ./spec/models/user_stat_spec.rb ./spec/models/user_visit_spec.rb ./spec/models/username_validator_spec.rb ./spec/models/view_spec.rb ./spec/serializers/basic_post_serializer_spec.rb ./spec/serializers/post_serializer_spec.rb ./spec/serializers/topic_list_item_serializer_spec.rb ./spec/serializers/user_serializer_spec.rb ./spec/services/auto_block_spec.rb ./spec/services/flag_sockpuppets_spec.rb ./spec/services/group_message_spec.rb ./spec/services/spam_rules_enforcer_spec.rb ./spec/services/staff_action_logger_spec.rb ./spec/services/uri_adapter_spec.rb ./spec/services/user_blocker_spec.rb ./spec/services/user_updater_spec.rb ./spec/services/username_checker_service_spec.rb ./spec/views/omniauth_callbacks/complete.html.erb_spec.rb ./spec/views/omniauth_callbacks/failure.html.erb_spec.rb
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................FF...FF.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Failures:
1) TopicLinkClick topic_links create_from with a valid url and post_id has the topic_link id
Failure/Error: @click.topic_link.should == @topic_link
NoMethodError:
undefined method `topic_link' for nil:NilClass
# ./spec/models/topic_link_click_spec.rb:74:in `block (5 levels) in <top (required)>'
2) TopicLinkClick topic_links create_from with a valid url and post_id creates a click
Failure/Error: @click.should be_present
expected present? to return true, got false
# ./spec/models/topic_link_click_spec.rb:70:in `block (5 levels) in <top (required)>'
3) TopicLinkClick topic_links create_from with a valid url and topic_id has the topic_link id
Failure/Error: @click.topic_link.should == @topic_link
NoMethodError:
undefined method `topic_link' for nil:NilClass
# ./spec/models/topic_link_click_spec.rb:99:in `block (5 levels) in <top (required)>'
4) TopicLinkClick topic_links create_from with a valid url and topic_id creates a click
Failure/Error: @click.should be_present
expected present? to return true, got false
# ./spec/models/topic_link_click_spec.rb:95:in `block (5 levels) in <top (required)>'
Finished in 6 minutes 23 seconds
3359 examples, 4 failures
Failed examples:
rspec ./spec/models/topic_link_click_spec.rb:73 # TopicLinkClick topic_links create_from with a valid url and post_id has the topic_link id
rspec ./spec/models/topic_link_click_spec.rb:69 # TopicLinkClick topic_links create_from with a valid url and post_id creates a click
rspec ./spec/models/topic_link_click_spec.rb:98 # TopicLinkClick topic_links create_from with a valid url and topic_id has the topic_link id
rspec ./spec/models/topic_link_click_spec.rb:94 # TopicLinkClick topic_links create_from with a valid url and topic_id creates a click
Randomized with seed 31898
/usr/local/rvm/rubies/ruby-2.0.0-p0-turbo/bin/ruby -S rspec ./spec/components/admin_user_index_query_spec.rb ./spec/components/archetype_spec.rb ./spec/components/auth/facebook_authenticator_spec.rb ./spec/components/auth/open_id_authenticator_spec.rb ./spec/components/avatar_detector_spec.rb ./spec/components/avatar_lookup_spec.rb ./spec/components/avatar_upload_service_spec.rb ./spec/components/boost_trust_level_spec.rb ./spec/components/cache_spec.rb ./spec/components/category_list_spec.rb ./spec/components/common_passwords/common_passwords_spec.rb ./spec/components/composer_messages_finder_spec.rb ./spec/components/concern/positionable_spec.rb ./spec/components/content_buffer_spec.rb ./spec/components/cooked_post_processor_spec.rb ./spec/components/current_user_spec.rb ./spec/components/directory_helper_spec.rb ./spec/components/discourse_diff_spec.rb ./spec/components/discourse_hub_spec.rb ./spec/components/discourse_plugin_registry_spec.rb ./spec/components/discourse_spec.rb ./spec/components/discourse_updates_spec.rb ./spec/components/distributed_hash_spec.rb ./spec/components/distributed_memoizer_spec.rb ./spec/components/email/email_spec.rb ./spec/components/email/message_builder_spec.rb ./spec/components/email/receiver_spec.rb ./spec/components/email/sender_spec.rb ./spec/components/email/styles_spec.rb ./spec/components/enum_spec.rb ./spec/components/export/export_spec.rb ./spec/components/export/json_encoder_spec.rb ./spec/components/file_store/local_store_spec.rb ./spec/components/file_store/s3_store_spec.rb ./spec/components/filter_best_posts_spec.rb ./spec/components/flag_query_spec.rb ./spec/components/gaps_spec.rb ./spec/components/guardian_spec.rb ./spec/components/image_sizer_spec.rb ./spec/components/import/adapter/base_spec.rb ./spec/components/import/import_spec.rb ./spec/components/import/json_decoder_spec.rb ./spec/components/js_locale_helper_spec.rb ./spec/components/middleware/anonymous_cache_spec.rb ./spec/components/oneboxer/amazon_onebox_spec.rb ./spec/components/oneboxer/android_app_store_onebox_spec.rb ./spec/components/oneboxer/apple_app_onebox_spec.rb ./spec/components/oneboxer/flash_video_onebox_spec.rb ./spec/components/oneboxer/flickr_onebox_spec.rb ./spec/components/oneboxer/gist_onebox_spec.rb ./spec/components/oneboxer/github_commit_onebox_spec.rb ./spec/components/oneboxer/github_pullrequest_onebox_spec.rb ./spec/components/oneboxer/handlebars_onebox_spec.rb ./spec/components/oneboxer/rottentomatoes_onebox_spec.rb ./spec/components/oneboxer/stack_exchange_onebox_spec.rb ./spec/components/oneboxer/twitter_onebox_spec.rb ./spec/components/oneboxer/whitelist_spec.rb ./spec/components/oneboxer/wikipedia_onebox_spec.rb ./spec/components/oneboxer_spec.rb ./spec/components/onpdiff_spec.rb ./spec/components/pbkdf2_spec.rb ./spec/components/pinned_check_spec.rb ./spec/components/plugin/filter_manager_spec.rb ./spec/components/plugin/instance_spec.rb ./spec/components/plugin/metadata_spec.rb ./spec/components/post_creator_spec.rb ./spec/components/post_destroyer_spec.rb ./spec/components/post_revisor_spec.rb ./spec/components/pretty_text_spec.rb ./spec/components/promotion_spec.rb ./spec/components/rate_limiter_spec.rb ./spec/components/redis_store_spec.rb ./spec/components/score_calculator_spec.rb ./spec/components/search_spec.rb ./spec/components/site_setting_extension_spec.rb ./spec/components/site_settings/db_provider_spec.rb ./spec/components/site_settings/local_process_provider_spec.rb ./spec/components/site_settings/yaml_loader_spec.rb ./spec/components/slug_spec.rb ./spec/components/sql_builder_spec.rb ./spec/components/suggested_topics_builder_spec.rb ./spec/components/summarize_spec.rb ./spec/components/system_message_spec.rb ./spec/components/text_cleaner_spec.rb ./spec/components/text_sentinel_spec.rb ./spec/components/topic_creator_spec.rb ./spec/components/topic_query_spec.rb ./spec/components/topic_retriever_spec.rb ./spec/components/topic_view_spec.rb ./spec/components/trashable_spec.rb ./spec/components/unread_spec.rb ./spec/components/url_helper_spec.rb ./spec/components/user_destroyer_spec.rb ./spec/components/user_name_suggester_spec.rb ./spec/components/validators/allowed_ip_address_validator_spec.rb ./spec/components/validators/email_validator_spec.rb ./spec/components/validators/ip_address_format_validator_spec.rb ./spec/components/validators/password_validator_spec.rb ./spec/components/validators/post_validator_spec.rb ./spec/components/validators/quality_title_validator_spec.rb ./spec/components/validators/topic_title_length_validator_spec.rb ./spec/controllers/admin/admin_controller_spec.rb ./spec/controllers/admin/api_controller_spec.rb ./spec/controllers/admin/dashboard_controller_spec.rb ./spec/controllers/admin/email_controller_spec.rb ./spec/controllers/admin/export_controller_spec.rb ./spec/controllers/admin/flags_controller_spec.rb ./spec/controllers/admin/groups_controller_spec.rb ./spec/controllers/admin/impersonate_controller_spec.rb ./spec/controllers/admin/reports_controller_spec.rb ./spec/controllers/admin/screened_emails_controller_spec.rb ./spec/controllers/admin/screened_ip_addresses_controller_spec.rb ./spec/controllers/admin/screened_urls_controller_spec.rb ./spec/controllers/admin/site_content_types_controller_spec.rb ./spec/controllers/admin/site_contents_controller_spec.rb ./spec/controllers/admin/site_customizations_controller_spec.rb ./spec/controllers/admin/site_settings_controller_spec.rb ./spec/controllers/admin/staff_action_logs_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/versions_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/categories_controller_spec.rb ./spec/controllers/clicks_controller_spec.rb ./spec/controllers/composer_messages_controller_spec.rb ./spec/controllers/draft_controller_spec.rb ./spec/controllers/email_controller_spec.rb ./spec/controllers/embed_controller_spec.rb ./spec/controllers/invites_controller_spec.rb ./spec/controllers/list_controller_spec.rb ./spec/controllers/notifications_controller_spec.rb ./spec/controllers/omniauth_callbacks_controller_spec.rb ./spec/controllers/onebox_controller_spec.rb ./spec/controllers/post_actions_controller_spec.rb ./spec/controllers/posts_controller_spec.rb ./spec/controllers/robots_txt_controller_spec.rb ./spec/controllers/search_controller_spec.rb ./spec/controllers/session_controller_spec.rb ./spec/controllers/static_controller_spec.rb ./spec/controllers/topics_controller_spec.rb ./spec/controllers/uploads_controller_spec.rb ./spec/controllers/user_actions_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/integration/same_ip_spammers_spec.rb ./spec/integration/spam_rules_spec.rb ./spec/integration/topic_auto_close_spec.rb ./spec/integrity/i18n_spec.rb ./spec/jobs/close_topic_spec.rb ./spec/jobs/enqueue_digest_emails_spec.rb ./spec/jobs/exporter_spec.rb ./spec/jobs/feature_topic_users_spec.rb ./spec/jobs/importer_spec.rb ./spec/jobs/invite_email_spec.rb ./spec/jobs/jobs_base_spec.rb ./spec/jobs/jobs_spec.rb ./spec/jobs/notify_moved_posts_spec.rb ./spec/jobs/pending_users_reminder_spec.rb ./spec/jobs/periodical_updates_spec.rb ./spec/jobs/poll_feed_spec.rb ./spec/jobs/poll_mailbox_spec.rb ./spec/jobs/process_post_spec.rb ./spec/jobs/send_system_message_spec.rb ./spec/jobs/test_email_spec.rb ./spec/jobs/user_email_spec.rb ./spec/mailers/invite_mailer_spec.rb ./spec/mailers/test_mailer_spec.rb ./spec/mailers/user_notifications_spec.rb ./spec/mailers/version_mailer_spec.rb ./spec/models/admin_dashboard_data_spec.rb ./spec/models/api_key_spec.rb ./spec/models/category_featured_topic_spec.rb ./spec/models/category_featured_user_spec.rb ./spec/models/category_spec.rb ./spec/models/category_user_spec.rb ./spec/models/digest_email_site_setting_spec.rb ./spec/models/draft_sequence_spec.rb ./spec/models/draft_spec.rb ./spec/models/email_log_spec.rb ./spec/models/email_token_spec.rb ./spec/models/error_log_spec.rb ./spec/models/global_setting_spec.rb ./spec/models/group_spec.rb ./spec/models/hot_topic_spec.rb ./spec/models/incoming_link_spec.rb ./spec/models/incoming_links_report_spec.rb ./spec/models/invite_redeemer_spec.rb ./spec/models/invite_spec.rb ./spec/models/locale_site_setting_spec.rb ./spec/models/notification_spec.rb ./spec/models/optimized_image_spec.rb ./spec/models/plugin_store_spec.rb ./spec/models/post_action_spec.rb ./spec/models/post_alert_observer_spec.rb ./spec/models/post_analyzer_spec.rb ./spec/models/post_detail_spec.rb ./spec/models/post_mover_spec.rb ./spec/models/post_reply_spec.rb ./spec/models/post_spec.rb ./spec/models/post_timing_spec.rb ./spec/models/post_upload_spec.rb ./spec/models/report_spec.rb ./spec/models/s3_region_site_setting_spec.rb ./spec/models/screened_email_spec.rb ./spec/models/screened_ip_address_spec.rb ./spec/models/screened_url_spec.rb ./spec/models/site_content_spec.rb ./spec/models/site_customization_spec.rb ./spec/models/site_setting_spec.rb ./spec/models/site_spec.rb ./spec/models/top_menu_item_spec.rb ./spec/models/top_topic_spec.rb ./spec/models/topic_allowed_user_spec.rb ./spec/models/topic_embed_spec.rb ./spec/models/topic_invite_spec.rb ./spec/models/topic_link_click_spec.rb ./spec/models/topic_link_spec.rb ./spec/models/topic_posters_summary_spec.rb ./spec/models/topic_spec.rb ./spec/models/topic_status_update_spec.rb ./spec/models/topic_tracking_state_spec.rb ./spec/models/topic_user_spec.rb ./spec/models/twitter_user_info_spec.rb ./spec/models/upload_spec.rb ./spec/models/user_action_spec.rb ./spec/models/user_email_observer_spec.rb ./spec/models/user_history_spec.rb ./spec/models/user_open_id_spec.rb ./spec/models/user_search_spec.rb ./spec/models/user_spec.rb ./spec/models/user_stat_spec.rb ./spec/models/user_visit_spec.rb ./spec/models/username_validator_spec.rb ./spec/models/view_spec.rb ./spec/serializers/basic_post_serializer_spec.rb ./spec/serializers/post_serializer_spec.rb ./spec/serializers/topic_list_item_serializer_spec.rb ./spec/serializers/user_serializer_spec.rb ./spec/services/auto_block_spec.rb ./spec/services/flag_sockpuppets_spec.rb ./spec/services/group_message_spec.rb ./spec/services/spam_rules_enforcer_spec.rb ./spec/services/staff_action_logger_spec.rb ./spec/services/uri_adapter_spec.rb ./spec/services/user_blocker_spec.rb ./spec/services/user_updater_spec.rb ./spec/services/username_checker_service_spec.rb ./spec/views/omniauth_callbacks/complete.html.erb_spec.rb ./spec/views/omniauth_callbacks/failure.html.erb_spec.rb failed
[vagrant@precise32:/vagrant (master)]$ rake spec
/usr/local/rvm/rubies/ruby-2.0.0-p0-turbo/bin/ruby -S rspec ./spec/components/admin_user_index_query_spec.rb ./spec/components/archetype_spec.rb ./spec/components/auth/facebook_authenticator_spec.rb ./spec/components/auth/open_id_authenticator_spec.rb ./spec/components/avatar_detector_spec.rb ./spec/components/avatar_lookup_spec.rb ./spec/components/avatar_upload_service_spec.rb ./spec/components/boost_trust_level_spec.rb ./spec/components/cache_spec.rb ./spec/components/category_list_spec.rb ./spec/components/common_passwords/common_passwords_spec.rb ./spec/components/composer_messages_finder_spec.rb ./spec/components/concern/positionable_spec.rb ./spec/components/content_buffer_spec.rb ./spec/components/cooked_post_processor_spec.rb ./spec/components/current_user_spec.rb ./spec/components/directory_helper_spec.rb ./spec/components/discourse_diff_spec.rb ./spec/components/discourse_hub_spec.rb ./spec/components/discourse_plugin_registry_spec.rb ./spec/components/discourse_spec.rb ./spec/components/discourse_updates_spec.rb ./spec/components/distributed_hash_spec.rb ./spec/components/distributed_memoizer_spec.rb ./spec/components/email/email_spec.rb ./spec/components/email/message_builder_spec.rb ./spec/components/email/receiver_spec.rb ./spec/components/email/sender_spec.rb ./spec/components/email/styles_spec.rb ./spec/components/enum_spec.rb ./spec/components/export/export_spec.rb ./spec/components/export/json_encoder_spec.rb ./spec/components/file_store/local_store_spec.rb ./spec/components/file_store/s3_store_spec.rb ./spec/components/filter_best_posts_spec.rb ./spec/components/flag_query_spec.rb ./spec/components/gaps_spec.rb ./spec/components/guardian_spec.rb ./spec/components/image_sizer_spec.rb ./spec/components/import/adapter/base_spec.rb ./spec/components/import/import_spec.rb ./spec/components/import/json_decoder_spec.rb ./spec/components/js_locale_helper_spec.rb ./spec/components/middleware/anonymous_cache_spec.rb ./spec/components/oneboxer/amazon_onebox_spec.rb ./spec/components/oneboxer/android_app_store_onebox_spec.rb ./spec/components/oneboxer/apple_app_onebox_spec.rb ./spec/components/oneboxer/flash_video_onebox_spec.rb ./spec/components/oneboxer/flickr_onebox_spec.rb ./spec/components/oneboxer/gist_onebox_spec.rb ./spec/components/oneboxer/github_commit_onebox_spec.rb ./spec/components/oneboxer/github_pullrequest_onebox_spec.rb ./spec/components/oneboxer/handlebars_onebox_spec.rb ./spec/components/oneboxer/rottentomatoes_onebox_spec.rb ./spec/components/oneboxer/stack_exchange_onebox_spec.rb ./spec/components/oneboxer/twitter_onebox_spec.rb ./spec/components/oneboxer/whitelist_spec.rb ./spec/components/oneboxer/wikipedia_onebox_spec.rb ./spec/components/oneboxer_spec.rb ./spec/components/onpdiff_spec.rb ./spec/components/pbkdf2_spec.rb ./spec/components/pinned_check_spec.rb ./spec/components/plugin/filter_manager_spec.rb ./spec/components/plugin/instance_spec.rb ./spec/components/plugin/metadata_spec.rb ./spec/components/post_creator_spec.rb ./spec/components/post_destroyer_spec.rb ./spec/components/post_revisor_spec.rb ./spec/components/pretty_text_spec.rb ./spec/components/promotion_spec.rb ./spec/components/rate_limiter_spec.rb ./spec/components/redis_store_spec.rb ./spec/components/score_calculator_spec.rb ./spec/components/search_spec.rb ./spec/components/site_setting_extension_spec.rb ./spec/components/site_settings/db_provider_spec.rb ./spec/components/site_settings/local_process_provider_spec.rb ./spec/components/site_settings/yaml_loader_spec.rb ./spec/components/slug_spec.rb ./spec/components/sql_builder_spec.rb ./spec/components/suggested_topics_builder_spec.rb ./spec/components/summarize_spec.rb ./spec/components/system_message_spec.rb ./spec/components/text_cleaner_spec.rb ./spec/components/text_sentinel_spec.rb ./spec/components/topic_creator_spec.rb ./spec/components/topic_query_spec.rb ./spec/components/topic_retriever_spec.rb ./spec/components/topic_view_spec.rb ./spec/components/trashable_spec.rb ./spec/components/unread_spec.rb ./spec/components/url_helper_spec.rb ./spec/components/user_destroyer_spec.rb ./spec/components/user_name_suggester_spec.rb ./spec/components/validators/allowed_ip_address_validator_spec.rb ./spec/components/validators/email_validator_spec.rb ./spec/components/validators/ip_address_format_validator_spec.rb ./spec/components/validators/password_validator_spec.rb ./spec/components/validators/post_validator_spec.rb ./spec/components/validators/quality_title_validator_spec.rb ./spec/components/validators/topic_title_length_validator_spec.rb ./spec/controllers/admin/admin_controller_spec.rb ./spec/controllers/admin/api_controller_spec.rb ./spec/controllers/admin/dashboard_controller_spec.rb ./spec/controllers/admin/email_controller_spec.rb ./spec/controllers/admin/export_controller_spec.rb ./spec/controllers/admin/flags_controller_spec.rb ./spec/controllers/admin/groups_controller_spec.rb ./spec/controllers/admin/impersonate_controller_spec.rb ./spec/controllers/admin/reports_controller_spec.rb ./spec/controllers/admin/screened_emails_controller_spec.rb ./spec/controllers/admin/screened_ip_addresses_controller_spec.rb ./spec/controllers/admin/screened_urls_controller_spec.rb ./spec/controllers/admin/site_content_types_controller_spec.rb ./spec/controllers/admin/site_contents_controller_spec.rb ./spec/controllers/admin/site_customizations_controller_spec.rb ./spec/controllers/admin/site_settings_controller_spec.rb ./spec/controllers/admin/staff_action_logs_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/versions_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/categories_controller_spec.rb ./spec/controllers/clicks_controller_spec.rb ./spec/controllers/composer_messages_controller_spec.rb ./spec/controllers/draft_controller_spec.rb ./spec/controllers/email_controller_spec.rb ./spec/controllers/embed_controller_spec.rb ./spec/controllers/invites_controller_spec.rb ./spec/controllers/list_controller_spec.rb ./spec/controllers/notifications_controller_spec.rb ./spec/controllers/omniauth_callbacks_controller_spec.rb ./spec/controllers/onebox_controller_spec.rb ./spec/controllers/post_actions_controller_spec.rb ./spec/controllers/posts_controller_spec.rb ./spec/controllers/robots_txt_controller_spec.rb ./spec/controllers/search_controller_spec.rb ./spec/controllers/session_controller_spec.rb ./spec/controllers/static_controller_spec.rb ./spec/controllers/topics_controller_spec.rb ./spec/controllers/uploads_controller_spec.rb ./spec/controllers/user_actions_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/integration/same_ip_spammers_spec.rb ./spec/integration/spam_rules_spec.rb ./spec/integration/topic_auto_close_spec.rb ./spec/integrity/i18n_spec.rb ./spec/jobs/close_topic_spec.rb ./spec/jobs/enqueue_digest_emails_spec.rb ./spec/jobs/exporter_spec.rb ./spec/jobs/feature_topic_users_spec.rb ./spec/jobs/importer_spec.rb ./spec/jobs/invite_email_spec.rb ./spec/jobs/jobs_base_spec.rb ./spec/jobs/jobs_spec.rb ./spec/jobs/notify_moved_posts_spec.rb ./spec/jobs/pending_users_reminder_spec.rb ./spec/jobs/periodical_updates_spec.rb ./spec/jobs/poll_feed_spec.rb ./spec/jobs/poll_mailbox_spec.rb ./spec/jobs/process_post_spec.rb ./spec/jobs/send_system_message_spec.rb ./spec/jobs/test_email_spec.rb ./spec/jobs/user_email_spec.rb ./spec/mailers/invite_mailer_spec.rb ./spec/mailers/test_mailer_spec.rb ./spec/mailers/user_notifications_spec.rb ./spec/mailers/version_mailer_spec.rb ./spec/models/admin_dashboard_data_spec.rb ./spec/models/api_key_spec.rb ./spec/models/category_featured_topic_spec.rb ./spec/models/category_featured_user_spec.rb ./spec/models/category_spec.rb ./spec/models/category_user_spec.rb ./spec/models/digest_email_site_setting_spec.rb ./spec/models/draft_sequence_spec.rb ./spec/models/draft_spec.rb ./spec/models/email_log_spec.rb ./spec/models/email_token_spec.rb ./spec/models/error_log_spec.rb ./spec/models/global_setting_spec.rb ./spec/models/group_spec.rb ./spec/models/hot_topic_spec.rb ./spec/models/incoming_link_spec.rb ./spec/models/incoming_links_report_spec.rb ./spec/models/invite_redeemer_spec.rb ./spec/models/invite_spec.rb ./spec/models/locale_site_setting_spec.rb ./spec/models/notification_spec.rb ./spec/models/optimized_image_spec.rb ./spec/models/plugin_store_spec.rb ./spec/models/post_action_spec.rb ./spec/models/post_alert_observer_spec.rb ./spec/models/post_analyzer_spec.rb ./spec/models/post_detail_spec.rb ./spec/models/post_mover_spec.rb ./spec/models/post_reply_spec.rb ./spec/models/post_spec.rb ./spec/models/post_timing_spec.rb ./spec/models/post_upload_spec.rb ./spec/models/report_spec.rb ./spec/models/s3_region_site_setting_spec.rb ./spec/models/screened_email_spec.rb ./spec/models/screened_ip_address_spec.rb ./spec/models/screened_url_spec.rb ./spec/models/site_content_spec.rb ./spec/models/site_customization_spec.rb ./spec/models/site_setting_spec.rb ./spec/models/site_spec.rb ./spec/models/top_menu_item_spec.rb ./spec/models/top_topic_spec.rb ./spec/models/topic_allowed_user_spec.rb ./spec/models/topic_embed_spec.rb ./spec/models/topic_invite_spec.rb ./spec/models/topic_link_click_spec.rb ./spec/models/topic_link_spec.rb ./spec/models/topic_posters_summary_spec.rb ./spec/models/topic_spec.rb ./spec/models/topic_status_update_spec.rb ./spec/models/topic_tracking_state_spec.rb ./spec/models/topic_user_spec.rb ./spec/models/twitter_user_info_spec.rb ./spec/models/upload_spec.rb ./spec/models/user_action_spec.rb ./spec/models/user_email_observer_spec.rb ./spec/models/user_history_spec.rb ./spec/models/user_open_id_spec.rb ./spec/models/user_search_spec.rb ./spec/models/user_spec.rb ./spec/models/user_stat_spec.rb ./spec/models/user_visit_spec.rb ./spec/models/username_validator_spec.rb ./spec/models/view_spec.rb ./spec/serializers/basic_post_serializer_spec.rb ./spec/serializers/post_serializer_spec.rb ./spec/serializers/topic_list_item_serializer_spec.rb ./spec/serializers/user_serializer_spec.rb ./spec/services/auto_block_spec.rb ./spec/services/flag_sockpuppets_spec.rb ./spec/services/group_message_spec.rb ./spec/services/spam_rules_enforcer_spec.rb ./spec/services/staff_action_logger_spec.rb ./spec/services/uri_adapter_spec.rb ./spec/services/user_blocker_spec.rb ./spec/services/user_updater_spec.rb ./spec/services/username_checker_service_spec.rb ./spec/views/omniauth_callbacks/complete.html.erb_spec.rb ./spec/views/omniauth_callbacks/failure.html.erb_spec.rb
..[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 6 minutes 22 seconds
3359 examples, 0 failures
Randomized with seed 19842
[vagrant@precise32:/vagrant (master)]$ rake spec --order rand:31898
invalid option: --order
[vagrant@precise32:/vagrant (master)]$
[vagrant@precise32:/vagrant (master)]$ rake spec --order rand:31898
invalid option: --order
[vagrant@precise32:/vagrant (master)]$
[vagrant@precise32:/vagrant (master)]$ bundle exec rake spec --order rand:31898
invalid option: --order
[vagrant@precise32:/vagrant (master)]$
[vagrant@precise32:/vagrant (master)]$ rspec spec --order rand:31898
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 6 minutes 59 seconds
3359 examples, 0 failures
Randomized with seed 31898
[vagrant@precise32:/vagrant (master)]$ rake db:test:prepare
psql:/vagrant/db/structure.sql:36: WARNING: => is deprecated as an operator name
DETAIL: This name may be disallowed altogether in future versions of PostgreSQL.
[vagrant@precise32:/vagrant (master)]$ rspec spec --order rand:31898
Seeding uncategorized category!
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
........................................................................................................................................................................................................................................F..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................FF.F.F....FFF.FFF.F..F.F.........F......................................................................................F.................................................................................................................................................................................................F............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.............................F....F........F..F..................................................................................................................................FFFF........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Failures:
1) Guardian can_delete? a Category can't be deleted if it is the Uncategorizied Category
Failure/Error: uncategorized_category = Category.find(uncategorized_cat_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/guardian_spec.rb:805:in `block (4 levels) in <top (required)>'
2) TopicQuery list_posted created topics includes the created topic
Failure/Error: topics.include?(created_topic).should be_true
expected: true value
got: false
# ./spec/components/topic_query_spec.rb:339:in `block (4 levels) in <top (required)>'
3) TopicQuery list_posted topic you've posted in includes the posted topic
Failure/Error: topics.include?(other_users_topic).should be_true
expected: true value
got: false
# ./spec/components/topic_query_spec.rb:348:in `block (4 levels) in <top (required)>'
4) TopicQuery unread / read topics with read data user with auto_track_topics list_unread only contains the partially read topic
Failure/Error: topic_query.list_unread.topics.should == [partially_read]
expected: [#<Topic id: 188, title: "This is a test topic 172", last_posted_at: nil, created_at: "2014-01-06 18:34:22", updated_at: "2014-01-06 18:34:22", views: 0, posts_count: 0, user_id: 371, last_post_user_id: 371, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:22", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-172", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 188, title: "This is a test topic 172", last_posted_at: nil, created_at: "2014-01-06 18:34:22", updated_at: "2014-01-06 18:34:22", views: 0, posts_count: 0, user_id: 371, last_post_user_id: 371, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:22", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-172", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:246:in `block (5 levels) in <top (required)>'
5) TopicQuery unread / read topics with read data list_read contain both topics
Failure/Error: topic_query.list_read.topics.should =~ [fully_read, partially_read]
expected collection contained: [#<Topic id: 192, title: "This is a test topic 176", last_posted_at: nil, created_at: "2014-01-06 18:34:22", updated_at: "2014-01-06 18:34:22", views: 0, posts_count: 0, user_id: 375, last_post_user_id: 375, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:22", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-176", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 193, title: "This is a test topic 177", last_posted_at: nil, created_at: "2014-01-06 18:34:22", updated_at: "2014-01-06 18:34:22", views: 0, posts_count: 0, user_id: 375, last_post_user_id: 375, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:22", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-177", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
actual collection contained: []
the missing elements were: [#<Topic id: 192, title: "This is a test topic 176", last_posted_at: nil, created_at: "2014-01-06 18:34:22", updated_at: "2014-01-06 18:34:22", views: 0, posts_count: 0, user_id: 375, last_post_user_id: 375, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:22", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-176", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 193, title: "This is a test topic 177", last_posted_at: nil, created_at: "2014-01-06 18:34:22", updated_at: "2014-01-06 18:34:22", views: 0, posts_count: 0, user_id: 375, last_post_user_id: 375, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:22", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-177", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
# ./spec/components/topic_query_spec.rb:252:in `block (5 levels) in <top (required)>'
6) TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited
Failure/Error: topic_query.list_favorited.topics.should == [topic]
expected: [#<Topic id: 204, title: "This is a test topic 184", last_posted_at: nil, created_at: "2014-01-06 18:34:23", updated_at: "2014-01-06 18:34:23", views: 0, posts_count: 0, user_id: 391, last_post_user_id: 391, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:23", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-184", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 204, title: "This is a test topic 184", last_posted_at: nil, created_at: "2014-01-06 18:34:23", updated_at: "2014-01-06 18:34:23", views: 0, posts_count: 0, user_id: 391, last_post_user_id: 391, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:23", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-184", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:274:in `block (4 levels) in <top (required)>'
7) TopicQuery suggested_for anonymously browswing with invisible, closed and archived should omit the closed/archived/invisbiel topics from suggested
Failure/Error: TopicQuery.new.list_suggested_for(topic).topics.should == [regular_topic]
expected: [#<Topic id: 206, title: "This is a test topic 186", last_posted_at: nil, created_at: "2014-01-06 18:34:24", updated_at: "2014-01-06 18:34:24", views: 0, posts_count: 0, user_id: 394, last_post_user_id: 394, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:24", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-186", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 206, title: "This is a test topic 186", last_posted_at: nil, created_at: "2014-01-06 18:34:24", updated_at: "2014-01-06 18:34:24", views: 0, posts_count: 0, user_id: 394, last_post_user_id: 394, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:24", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-186", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:373:in `block (4 levels) in <top (required)>'
8) TopicQuery suggested_for when anonymous should return the new topic
Failure/Error: TopicQuery.new.list_suggested_for(topic).topics.should == [new_topic]
expected: [#<Topic id: 210, title: "This is a test topic 190", last_posted_at: nil, created_at: "2014-01-06 18:34:24", updated_at: "2014-01-06 18:34:24", views: 0, posts_count: 0, user_id: 395, last_post_user_id: 395, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:24", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-190", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 210, title: "This is a test topic 190", last_posted_at: nil, created_at: "2014-01-06 18:34:24", updated_at: "2014-01-06 18:34:24", views: 0, posts_count: 0, user_id: 395, last_post_user_id: 395, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:34:24", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-190", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:361:in `block (4 levels) in <top (required)>'
9) TopicQuery suggested_for when logged in with some existing topics won't fully read if there are enough partially read topics and new topics
Failure/Error: suggested_topics.should == [partially_read.id, new_topic.id]
expected: [213, 214]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:408:in `block (5 levels) in <top (required)>'
10) TopicQuery suggested_for when logged in with some existing topics won't return new or fully read if there are enough partially read topics
Failure/Error: suggested_topics.should == [partially_read.id]
expected: [220]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:403:in `block (5 levels) in <top (required)>'
11) TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random
Failure/Error: suggested_topics.should == [partially_read.id, new_topic.id, fully_read.id]
expected: [227, 228, 229]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:413:in `block (5 levels) in <top (required)>'
12) TopicQuery list_new with a new topic contains the new topic
Failure/Error: topics.should == [new_topic]
expected: [#<Topic id: 234, title: "This is a test topic 214", last_posted_at: nil, created_at: "2014-01-06 18:34:26", updated_at: "2014-01-06 18:34:26", views: 0, posts_count: 0, user_id: 409, last_post_user_id: 409, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:24:26", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-214", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 234, title: "This is a test topic 214", last_posted_at: nil, created_at: "2014-01-06 18:34:26", updated_at: "2014-01-06 18:34:26", views: 0, posts_count: 0, user_id: 409, last_post_user_id: 409, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:24:26", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-214", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:294:in `block (4 levels) in <top (required)>'
13) TopicQuery list_new with a new topic muted topics un-muted returns the topic again
Failure/Error: topics.should == [new_topic]
expected: [#<Topic id: 237, title: "This is a test topic 217", last_posted_at: nil, created_at: "2014-01-06 18:34:27", updated_at: "2014-01-06 18:34:27", views: 0, posts_count: 0, user_id: 415, last_post_user_id: 415, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:24:27", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-217", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 237, title: "This is a test topic 217", last_posted_at: nil, created_at: "2014-01-06 18:34:27", updated_at: "2014-01-06 18:34:27", views: 0, posts_count: 0, user_id: 415, last_post_user_id: 415, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:24:27", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-217", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:320:in `block (6 levels) in <top (required)>'
14) TopicQuery a bunch of topics list_latest returns the topics in the correct order
Failure/Error: topics.map(&:id).should == [pinned_topic, closed_topic, archived_topic, regular_topic].map(&:id)
expected: [244, 247, 245, 243]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:129:in `block (4 levels) in <top (required)>'
15) TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top
Failure/Error: topics.should == [closed_topic, archived_topic, pinned_topic, regular_topic]
expected: [#<Topic id: 297, title: "This is a closed topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 2, posts_count: 1, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 1, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: true, archived: false, bumped_at: "2014-01-06 18:33:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-closed-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 2, word_count: nil>, #<Topic id: 295, title: "This is an archived topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 50, posts_count: 4, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 30, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: true, bumped_at: "2014-01-06 18:28:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-an-archived-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 294, title: "This is a pinned topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 10, posts_count: 5, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 100, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:24:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: "2014-01-06 18:24:29", score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-pinned-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 12, word_count: nil>, #<Topic id: 293, title: "This is a regular topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 100, posts_count: 3, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 66, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:19:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-regular-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 11, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,5 +1,2 @@
-[#<Topic id: 297, title: "This is a closed topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 2, posts_count: 1, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 1, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: true, archived: false, bumped_at: "2014-01-06 18:33:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-closed-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 2, word_count: nil>,
- #<Topic id: 295, title: "This is an archived topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 50, posts_count: 4, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 30, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: true, bumped_at: "2014-01-06 18:28:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-an-archived-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>,
- #<Topic id: 294, title: "This is a pinned topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 10, posts_count: 5, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 100, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:24:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: "2014-01-06 18:24:29", score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-pinned-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 12, word_count: nil>,
- #<Topic id: 293, title: "This is a regular topic", last_posted_at: nil, created_at: "2014-01-06 18:34:29", updated_at: "2014-01-06 18:34:29", views: 100, posts_count: 3, user_id: 439, last_post_user_id: 439, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 66, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:19:29", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-regular-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 11, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:188:in `block (4 levels) in <top (required)>'
16) ListController indexes allows users to filter on a set of topic ids
Failure/Error: parsed["topic_list"]["topics"].length.should == 1
expected: 1
got: 0 (using ==)
# ./spec/controllers/list_controller_spec.rb:35:in `block (3 levels) in <top (required)>'
17) TopicsController show records a view
Failure/Error: lambda { xhr :get, :show, topic_id: topic.id, slug: topic.slug }.should change(View, :count).by(1)
count should have been changed by 1, but was changed by 0
# ./spec/controllers/topics_controller_spec.rb:523:in `block (3 levels) in <top (required)>'
18) Topic similar_to with a similar topic returns the similar topic if the title is similar
Failure/Error: Topic.similar_to("has evil trout made any topics?", "i am wondering has evil trout made any topics?").should == [topic]
expected: [#<Topic id: 670, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2014-01-06 18:35:45", updated_at: "2014-01-06 18:35:45", views: 0, posts_count: 0, user_id: 1148, last_post_user_id: 1148, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:35:45", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "evil-trout-is-the-dude-who-posted-this-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: #<ActiveRecord::Relation []> (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 670, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2014-01-06 18:35:45", updated_at: "2014-01-06 18:35:45", views: 0, posts_count: 0, user_id: 1148, last_post_user_id: 1148, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:35:45", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "evil-trout-is-the-dude-who-posted-this-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/models/topic_spec.rb:224:in `block (4 levels) in <top (required)>'
19) Topic revisions changing category removing a category creates a new revision
Failure/Error: topic.revisions.size.should == 3
expected: 3
got: 2 (using ==)
# ./spec/models/topic_spec.rb:774:in `block (5 levels) in <top (required)>'
20) Topic change_category without a previous category should not change the topic_count when not changed
Failure/Error: lambda { @topic.change_category(@topic.category.name); @category.reload }.should_not change(@category, :topic_count)
NoMethodError:
undefined method `name' for nil:NilClass
# ./spec/models/topic_spec.rb:804:in `block (5 levels) in <top (required)>'
# ./spec/models/topic_spec.rb:804:in `block (4 levels) in <top (required)>'
21) Topic change_category with a previous category when the category exists resets the category
Failure/Error: @topic.category_id.should == SiteSetting.uncategorized_category_id
expected: -1
got: 108 (using ==)
# ./spec/models/topic_spec.rb:883:in `block (5 levels) in <top (required)>'
22) Topic for_digest returns regular topics
Failure/Error: Topic.for_digest(user, 1.year.ago).should == [topic]
expected: [#<Topic id: 740, title: "This is a test topic 644", last_posted_at: nil, created_at: "2014-01-06 18:35:53", updated_at: "2014-01-06 18:35:53", views: 0, posts_count: 0, user_id: 1214, last_post_user_id: 1214, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:35:53", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-644", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: #<ActiveRecord::Relation []> (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 740, title: "This is a test topic 644", last_posted_at: nil, created_at: "2014-01-06 18:35:53", updated_at: "2014-01-06 18:35:53", views: 0, posts_count: 0, user_id: 1214, last_post_user_id: 1214, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2014-01-06 18:35:53", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-644", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/models/topic_spec.rb:1204:in `block (3 levels) in <top (required)>'
23) CategoryList category order default always at the end
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
24) CategoryList category order returns topics in specified order
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
25) CategoryList category order handles duplicate position values
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
26) CategoryList category order returns default order categories
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
27) TopicTrackingState correctly gets the tracking state
Failure/Error: report.length.should == 1
expected: 1
got: 0 (using ==)
# ./spec/models/topic_tracking_state_spec.rb:27:in `block (2 levels) in <top (required)>'
Finished in 5 minutes 32 seconds
3359 examples, 27 failures
Failed examples:
rspec ./spec/components/guardian_spec.rb:803 # Guardian can_delete? a Category can't be deleted if it is the Uncategorizied Category
rspec ./spec/components/topic_query_spec.rb:338 # TopicQuery list_posted created topics includes the created topic
rspec ./spec/components/topic_query_spec.rb:347 # TopicQuery list_posted topic you've posted in includes the posted topic
rspec ./spec/components/topic_query_spec.rb:245 # TopicQuery unread / read topics with read data user with auto_track_topics list_unread only contains the partially read topic
rspec ./spec/components/topic_query_spec.rb:251 # TopicQuery unread / read topics with read data list_read contain both topics
rspec ./spec/components/topic_query_spec.rb:273 # TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited
rspec ./spec/components/topic_query_spec.rb:372 # TopicQuery suggested_for anonymously browswing with invisible, closed and archived should omit the closed/archived/invisbiel topics from suggested
rspec ./spec/components/topic_query_spec.rb:360 # TopicQuery suggested_for when anonymous should return the new topic
rspec ./spec/components/topic_query_spec.rb:406 # TopicQuery suggested_for when logged in with some existing topics won't fully read if there are enough partially read topics and new topics
rspec ./spec/components/topic_query_spec.rb:401 # TopicQuery suggested_for when logged in with some existing topics won't return new or fully read if there are enough partially read topics
rspec ./spec/components/topic_query_spec.rb:411 # TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random
rspec ./spec/components/topic_query_spec.rb:293 # TopicQuery list_new with a new topic contains the new topic
rspec ./spec/components/topic_query_spec.rb:319 # TopicQuery list_new with a new topic muted topics un-muted returns the topic again
rspec ./spec/components/topic_query_spec.rb:128 # TopicQuery a bunch of topics list_latest returns the topics in the correct order
rspec ./spec/components/topic_query_spec.rb:187 # TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top
rspec ./spec/controllers/list_controller_spec.rb:29 # ListController indexes allows users to filter on a set of topic ids
rspec ./spec/controllers/topics_controller_spec.rb:522 # TopicsController show records a view
rspec ./spec/models/topic_spec.rb:223 # Topic similar_to with a similar topic returns the similar topic if the title is similar
rspec ./spec/models/topic_spec.rb:773 # Topic revisions changing category removing a category creates a new revision
rspec ./spec/models/topic_spec.rb:803 # Topic change_category without a previous category should not change the topic_count when not changed
rspec ./spec/models/topic_spec.rb:882 # Topic change_category with a previous category when the category exists resets the category
rspec ./spec/models/topic_spec.rb:1202 # Topic for_digest returns regular topics
rspec ./spec/components/category_list_spec.rb:95 # CategoryList category order default always at the end
rspec ./spec/components/category_list_spec.rb:84 # CategoryList category order returns topics in specified order
rspec ./spec/components/category_list_spec.rb:100 # CategoryList category order handles duplicate position values
rspec ./spec/components/category_list_spec.rb:89 # CategoryList category order returns default order categories
rspec ./spec/models/topic_tracking_state_spec.rb:18 # TopicTrackingState correctly gets the tracking state
Randomized with seed 31898
[vagrant@precise32:/vagrant (master)]$ rspec spec --order rand:31898
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F...............................................................................................................................................................................FF.......................................................................................................................................................................................................................................................................................................................................................................................................................F................................................................................................................................................................................................................................................................................................................................FF...FF.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Failures:
1) TopicsController show records a view
Failure/Error: lambda { xhr :get, :show, topic_id: topic.id, slug: topic.slug }.should change(View, :count).by(1)
count should have been changed by 1, but was changed by 0
# ./spec/controllers/topics_controller_spec.rb:523:in `block (3 levels) in <top (required)>'
2) UserStat#update_view_counts topics_entered with a view adds one to the topics entered
Failure/Error: stat.topics_entered.should == 1
expected: 1
got: 0 (using ==)
# ./spec/models/user_stat_spec.rb:35:in `block (5 levels) in <top (required)>'
3) UserStat#update_view_counts topics_entered with a view won't record a second view as a different topic
Failure/Error: stat.topics_entered.should == 1
expected: 1
got: 0 (using ==)
# ./spec/models/user_stat_spec.rb:42:in `block (5 levels) in <top (required)>'
4) Topic limits new users to max_topics_in_first_day and max_posts_in_first_day
Failure/Error: topic_id = create_post(user: user).topic_id
RateLimiter::LimitExceeded:
RateLimiter::LimitExceeded
# ./lib/rate_limiter.rb:46:in `performed!'
# ./lib/rate_limiter/on_create_record.rb:31:in `block in rate_limit'
# ./lib/topic_creator.rb:84:in `save_topic'
# ./lib/topic_creator.rb:22:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:41:in `create_post'
# ./spec/models/topic_spec.rb:1286:in `block (2 levels) in <top (required)>'
5) TopicLinkClick topic_links create_from with a valid url and post_id has the topic_link id
Failure/Error: @click.topic_link.should == @topic_link
NoMethodError:
undefined method `topic_link' for nil:NilClass
# ./spec/models/topic_link_click_spec.rb:74:in `block (5 levels) in <top (required)>'
6) TopicLinkClick topic_links create_from with a valid url and post_id creates a click
Failure/Error: @click.should be_present
expected present? to return true, got false
# ./spec/models/topic_link_click_spec.rb:70:in `block (5 levels) in <top (required)>'
7) TopicLinkClick topic_links create_from with a valid url and topic_id has the topic_link id
Failure/Error: @click.topic_link.should == @topic_link
NoMethodError:
undefined method `topic_link' for nil:NilClass
# ./spec/models/topic_link_click_spec.rb:99:in `block (5 levels) in <top (required)>'
8) TopicLinkClick topic_links create_from with a valid url and topic_id creates a click
Failure/Error: @click.should be_present
expected present? to return true, got false
# ./spec/models/topic_link_click_spec.rb:95:in `block (5 levels) in <top (required)>'
Finished in 6 minutes 24 seconds
3359 examples, 8 failures
Failed examples:
rspec ./spec/controllers/topics_controller_spec.rb:522 # TopicsController show records a view
rspec ./spec/models/user_stat_spec.rb:32 # UserStat#update_view_counts topics_entered with a view adds one to the topics entered
rspec ./spec/models/user_stat_spec.rb:38 # UserStat#update_view_counts topics_entered with a view won't record a second view as a different topic
rspec ./spec/models/topic_spec.rb:1275 # Topic limits new users to max_topics_in_first_day and max_posts_in_first_day
rspec ./spec/models/topic_link_click_spec.rb:73 # TopicLinkClick topic_links create_from with a valid url and post_id has the topic_link id
rspec ./spec/models/topic_link_click_spec.rb:69 # TopicLinkClick topic_links create_from with a valid url and post_id creates a click
rspec ./spec/models/topic_link_click_spec.rb:98 # TopicLinkClick topic_links create_from with a valid url and topic_id has the topic_link id
rspec ./spec/models/topic_link_click_spec.rb:94 # TopicLinkClick topic_links create_from with a valid url and topic_id creates a click
Randomized with seed 31898
[vagrant@precise32:/vagrant (master)]$ rspec spec --order rand:31898
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 6 minutes 35 seconds
3359 examples, 0 failures
Randomized with seed 31898
......................................................................................F.F...F..................F.FFF.F..FFF.............................................................................F................................................................................................................................................F..FFFFFFF..................................F...........................................................................FFFFFFFFFFFFFFFFF..FFF....FF.......F.FF.............................................................FF..............................................................................................................................................................FFFF......................F..............................................................................................................................................................................................................................................................................................................FFFFFFFFFF......FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF....F..........................................F..........................................................................................FF.....................................................F.....................................................................................................................F........................................F......F...F...F............................................................................................................................FF..........................................FFFFFFFFF......F..FFFFFF.FFFFFFFFFFFFFF........................................................................................................................................................................................................................................................................................................................................................................................................................................................................F......................................................................FF............................................................................................................................................................................................................................................................FF.FFFFFFFFFFFF..FFFFFFFFFFFF....................FFFFFFFFFFFFFFFFFFFFFFFFF.........................................................................F..FFFFF.......................................................................................................................................................................................................................................................................................................................................FFFFF.......................................F.........F....................................................................................................................F........................................................................FF.............FF..........................................................................................
Failures:
1) Category update_stats with revised post doesn't count each version of a post
Failure/Error: post = create_post(user: @category.user, category: @category.name)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 47, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 47 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/category_spec.rb:326:in `block (4 levels) in <top (required)>'
2) Category update_stats with regular topics updates topic stats
Failure/Error: create_post(user: @category.user, category: @category.name)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 51, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 51 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/category_spec.rb:286:in `block (4 levels) in <top (required)>'
3) Category latest should be updated correctly
Failure/Error: post = create_post(category: category.name)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 56, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 56 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/category_spec.rb:257:in `block (3 levels) in <top (required)>'
4) SessionController.create when email is confirmed also allow login by email sets a session id
Failure/Error: xhr :post, :create, login: user.email, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x1336d02c>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:67:in `block (5 levels) in <top (required)>'
5) SessionController.create when email is confirmed success by username sets a cookie with the auth token
Failure/Error: xhr :post, :create, login: user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x136d77d0>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:37:in `block (5 levels) in <top (required)>'
6) SessionController.create when email is confirmed success by username gives the user an auth token
Failure/Error: xhr :post, :create, login: user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x13925758>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:37:in `block (5 levels) in <top (required)>'
7) SessionController.create when email is confirmed success by username sets a session id
Failure/Error: xhr :post, :create, login: user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x13baac94>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:37:in `block (5 levels) in <top (required)>'
8) SessionController.create when email is confirmed strips leading @ symbol sets a session id
Failure/Error: xhr :post, :create, login: "@" + user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x13e4c664>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:56:in `block (5 levels) in <top (required)>'
9) SessionController.create when email is confirmed when the site requires approval of users with an unapproved user who is an admin sets a session id
Failure/Error: xhr :post, :create, login: user.email, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x140fc0d0>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:114:in `block (6 levels) in <top (required)>'
10) SessionController.create when email is confirmed login has leading and trailing space strips spaces from the username
Failure/Error: xhr :post, :create, login: username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x14273684>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:80:in `block (5 levels) in <top (required)>'
11) SessionController.create when email is confirmed login has leading and trailing space strips spaces from the email
Failure/Error: xhr :post, :create, login: email, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x143b5f74>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:85:in `block (5 levels) in <top (required)>'
12) User flag_linked_posts_as_spam has flagged all the user's posts as spam
Failure/Error: let!(:post) { PostCreator.new(user, title: "this topic contains spam", raw: "this post has a link: http://discourse.org").create }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 79, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 79 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/models/user_spec.rb:733:in `block (3 levels) in <top (required)>'
13) SpamRulesEnforcer auto-blocking users based on flagging spammer has trust level basic one spam post is flagged enough times by enough users Then { expect(spam_post.reload).to_not be_hidden }
Failure/Error: And { expect{PostCreator.create(spammer, {title: 'limited time offer for you', raw: 'better buy this stuff ok', archetype_id: 1})}.to_not raise_error }
expected no Exception, got #<ActiveRecord::StatementInvalid: PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 88, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 88 AND user_id = users.id)
> with backtrace:
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/integration/spam_rules_spec.rb:91:in `block (6 levels) in <top (required)>'
# ./spec/integration/spam_rules_spec.rb:91:in `block (5 levels) in <top (required)>'
# ./spec/integration/spam_rules_spec.rb:89:in `block in Then'
# ./spec/integration/spam_rules_spec.rb:91:in `block (5 levels) in <top (required)>'
# ./spec/integration/spam_rules_spec.rb:89:in `block in Then'
14) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times Then { expect(spam_post.reload).to_not be_hidden }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 91, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 91 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
15) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times flags_required_to_hide_post takes effect too Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 92, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 92 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
16) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 93, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 93 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
17) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users spammer becomes a basic user Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 94, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 94 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
18) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post is deleted Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 95, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 95 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
19) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post's flags are cleared Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 96, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 96 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
20) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times spam posts are flagged enough times, but not by enough users Then { expect(spam_post.reload).to_not be_hidden }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 97, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 97 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
21) Jobs::Exporter execute when no export or import is running when it finishes successfully and a user was given should send a notification to the user who started the export
Failure/Error: Jobs::Exporter.new.execute( @exporter_args.merge( user_id: @user.id ) )
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 98, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 98 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./lib/system_message.rb:31:in `create'
# ./app/jobs/regular/exporter.rb:110:in `send_notification'
# ./app/jobs/regular/exporter.rb:88:in `finish_export'
# ./app/jobs/regular/exporter.rb:41:in `execute'
# ./spec/jobs/exporter_spec.rb:157:in `block (7 levels) in <top (required)>'
# ./spec/jobs/exporter_spec.rb:156:in `block (6 levels) in <top (required)>'
22) PostDestroyer post actions should update flag counts on the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 150, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 150 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:269:in `block (3 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:284:in `block (3 levels) in <top (required)>'
23) PostDestroyer post actions should delete the post actions
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 151, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 151 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:269:in `block (3 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:277:in `block (3 levels) in <top (required)>'
24) PostDestroyer post actions should reset counts when a post is deleted
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 152, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 152 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:269:in `block (3 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:272:in `block (3 levels) in <top (required)>'
25) PostDestroyer deleting a post belonging to a deleted topic as a moderator deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 153, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 153 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:186:in `block (3 levels) in <top (required)>'
26) PostDestroyer deleting a post belonging to a deleted topic as an admin deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 154, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 154 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:186:in `block (3 levels) in <top (required)>'
27) PostDestroyer deleting the second post in a topic resets the last_poster_id back to the OP
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 155, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 155 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
28) PostDestroyer deleting the second post in a topic resets the last_posted_at back to the OP
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 156, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 156 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
29) PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 157, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 157 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
30) PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 158, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 158 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
31) PostDestroyer deleting the second post in a topic topic_user clears the posted flag for the second user
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 159, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 159 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
32) PostDestroyer basic destroying as the creator of the post, doesn't delete the post
Failure/Error: post2 = create_post # Create it here instead of with "let" so unique_posts_mins can do its thing
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 160, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 160 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:101:in `block (3 levels) in <top (required)>'
33) PostDestroyer basic destroying as a moderator deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 161, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 161 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:123:in `block (4 levels) in <top (required)>'
34) PostDestroyer basic destroying as an admin deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 162, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 162 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:134:in `block (4 levels) in <top (required)>'
35) PostDestroyer after delete should feature the users again (in case they've changed)
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 163 AND "topic_users"."user_id" = 355
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
36) PostDestroyer after delete with a reply should increase the post_number when there are deletion gaps
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 164 AND "topic_users"."user_id" = 357
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
37) PostDestroyer after delete with a reply lowers the reply_count when the reply is deleted
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 165 AND "topic_users"."user_id" = 359
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
38) PostDestroyer after delete with a reply changes the post count of the topic
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 166 AND "topic_users"."user_id" = 361
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
39) PostDestroyer @mentions removes notifications when deleted
Failure/Error: let!(:mention_post) { Fabricate(:post, raw: 'Hello @eviltrout')}
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 169 AND "topic_users"."user_id" = 368
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:257:in `block (3 levels) in <top (required)>'
40) PostDestroyer destroy_old_stubs destroys stubs for deleted by user posts
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 170, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 170 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:18:in `block (3 levels) in <top (required)>'
41) PostDestroyer destroy_old_stubs uses the delete_removed_posts_after site setting
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 171, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 171 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:60:in `block (3 levels) in <top (required)>'
42) Notification private message should create a private message notification
Failure/Error: @post = Fabricate(:post, topic: @topic, user: @topic.user)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 172 AND "topic_users"."user_id" = 375
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:91:in `user_private_message'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:50:in `enqueue_private'
# ./app/models/user_email_observer.rb:28:in `private_message'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:63:in `block in after_create_post'
# ./app/models/post_alert_observer.rb:62:in `each'
# ./app/models/post_alert_observer.rb:62:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:128:in `block (3 levels) in <top (required)>'
43) Notification private message should not add a pm notification for the creator
Failure/Error: @post = Fabricate(:post, topic: @topic, user: @topic.user)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 173 AND "topic_users"."user_id" = 377
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:91:in `user_private_message'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:50:in `enqueue_private'
# ./app/models/user_email_observer.rb:28:in `private_message'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:63:in `block in after_create_post'
# ./app/models/post_alert_observer.rb:62:in `each'
# ./app/models/post_alert_observer.rb:62:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:128:in `block (3 levels) in <top (required)>'
44) Notification.post returns the post
Failure/Error: let!(:notification) { Fabricate(:notification, user: post.user, topic: post.topic, post_number: post.post_number) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 179 AND "topic_users"."user_id" = 384
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./spec/models/notification_spec.rb:144:in `block (3 levels) in <top (required)>'
45) Notification post watching does notify watching users of new posts
Failure/Error: Fabricate(:post, user: post.user, topic: post.topic)
NoMethodError:
undefined method `last_emailed_post_number' for #<TopicUser:0xf99726c>
# ./app/mailers/user_notifications.rb:124:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:16:in `posted'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:135:in `block in notify_post_users'
# ./app/models/post_alert_observer.rb:134:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:45:in `block (5 levels) in <top (required)>'
# ./spec/models/notification_spec.rb:44:in `block (4 levels) in <top (required)>'
46) Notification post replies notifies the poster on reply
Failure/Error: @reply = Fabricate(:basic_reply, user: coding_horror, topic: post.topic)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 182 AND "topic_users"."user_id" = 389
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:24:in `replied'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:124:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:28:in `block (5 levels) in <top (required)>'
# ./spec/models/notification_spec.rb:27:in `block (4 levels) in <top (required)>'
47) TopicQuery list_posted created topics includes the created topic
Failure/Error: let!(:created_topic) { create_post(user: user).topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 256, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 256 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/topic_query_spec.rb:336:in `block (4 levels) in <top (required)>'
48) TopicQuery list_posted topic you've posted in includes the posted topic
Failure/Error: let(:other_users_topic) { create_post(user: creator).topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 257, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 257 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/topic_query_spec.rb:344:in `block (4 levels) in <top (required)>'
# ./spec/components/topic_query_spec.rb:345:in `block (4 levels) in <top (required)>'
49) SpamRulesEnforcer flag_sockpuppets is disabled Then { first_post.reload.spam_count.should == 0 }
Failure/Error: Given!(:first_post) { create_post(user: spammer1) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 365, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 365 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:14:in `block (3 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:17:in `block in Then'
50) SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies Then { first_post.reload.spam_count.should == 1 }
Failure/Error: Given!(:first_post) { create_post(user: spammer1) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 366, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 366 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:25:in `block (4 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:30:in `block in Then'
51) SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies third spam post Then { first_post.reload.spam_count.should == 1 }
Failure/Error: Given!(:first_post) { create_post(user: spammer1) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 367, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 367 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:25:in `block (4 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:36:in `block in Then'
52) SpamRulesEnforcer flag_sockpuppets is enabled first user is not new first user starts a topic a reply by a new user at the same IP address Then { first_post.reload.spam_count.should == 0 }
Failure/Error: Given!(:first_post) { create_post(user: old_user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 368, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 368 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:47:in `block (5 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:52:in `block in Then'
53) FlagQuery flagged_posts_report operates correctly
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 402, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 402 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/flag_query_spec.rb:10:in `block (3 levels) in <top (required)>'
54) UserNotifications user replied .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 439 AND "topic_users"."user_id" = 881
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
55) UserNotifications user replied .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 440 AND "topic_users"."user_id" = 882
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
56) UserNotifications user replied .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 441 AND "topic_users"."user_id" = 883
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
57) UserNotifications user replied .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 442 AND "topic_users"."user_id" = 884
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
58) UserNotifications user replied .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 443 AND "topic_users"."user_id" = 885
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
59) UserNotifications user replied .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 444 AND "topic_users"."user_id" = 886
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
60) UserNotifications user replied .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 445 AND "topic_users"."user_id" = 887
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
61) UserNotifications user replied .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 446 AND "topic_users"."user_id" = 888
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
62) UserNotifications user replied .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 447 AND "topic_users"."user_id" = 889
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
63) UserNotifications user replied reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 448 AND "topic_users"."user_id" = 890
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
64) UserNotifications user mentioned email .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 454 AND "topic_users"."user_id" = 902
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
65) UserNotifications user mentioned email .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 455 AND "topic_users"."user_id" = 903
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
66) UserNotifications user mentioned email .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 456 AND "topic_users"."user_id" = 904
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
67) UserNotifications user mentioned email .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 457 AND "topic_users"."user_id" = 905
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
68) UserNotifications user mentioned email .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 458 AND "topic_users"."user_id" = 906
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
69) UserNotifications user mentioned email .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 459 AND "topic_users"."user_id" = 907
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
70) UserNotifications user mentioned email .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 460 AND "topic_users"."user_id" = 908
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
71) UserNotifications user mentioned email .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 461 AND "topic_users"."user_id" = 909
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
72) UserNotifications user mentioned email .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 462 AND "topic_users"."user_id" = 910
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
73) UserNotifications user mentioned email reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 463 AND "topic_users"."user_id" = 911
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
74) UserNotifications user invited to a private message .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 464 AND "topic_users"."user_id" = 912
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
75) UserNotifications user invited to a private message .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 465 AND "topic_users"."user_id" = 913
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
76) UserNotifications user invited to a private message .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 466 AND "topic_users"."user_id" = 914
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
77) UserNotifications user invited to a private message .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 467 AND "topic_users"."user_id" = 915
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
78) UserNotifications user invited to a private message .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 468 AND "topic_users"."user_id" = 916
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
79) UserNotifications user invited to a private message .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 469 AND "topic_users"."user_id" = 917
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
80) UserNotifications user invited to a private message .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 470 AND "topic_users"."user_id" = 918
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
81) UserNotifications user invited to a private message .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 471 AND "topic_users"."user_id" = 919
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
82) UserNotifications user invited to a private message .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 472 AND "topic_users"."user_id" = 920
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
83) UserNotifications user invited to a private message reply_by_email doesn't support reply by email
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 473 AND "topic_users"."user_id" = 921
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:90:in `block (4 levels) in <top (required)>'
84) UserNotifications user posted .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 474 AND "topic_users"."user_id" = 922
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
85) UserNotifications user posted .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 475 AND "topic_users"."user_id" = 923
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
86) UserNotifications user posted .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 476 AND "topic_users"."user_id" = 924
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
87) UserNotifications user posted .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 477 AND "topic_users"."user_id" = 925
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
88) UserNotifications user posted .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 478 AND "topic_users"."user_id" = 926
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
89) UserNotifications user posted .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 479 AND "topic_users"."user_id" = 927
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
90) UserNotifications user posted .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 480 AND "topic_users"."user_id" = 928
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
91) UserNotifications user posted .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 481 AND "topic_users"."user_id" = 929
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
92) UserNotifications user posted .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 482 AND "topic_users"."user_id" = 930
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
93) UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 483 AND "topic_users"."user_id" = 931
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
94) UserNotifications user quoted .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 484 AND "topic_users"."user_id" = 932
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
95) UserNotifications user quoted .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 485 AND "topic_users"."user_id" = 933
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
96) UserNotifications user quoted .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 486 AND "topic_users"."user_id" = 934
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
97) UserNotifications user quoted .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 487 AND "topic_users"."user_id" = 935
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
98) UserNotifications user quoted .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 488 AND "topic_users"."user_id" = 936
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
99) UserNotifications user quoted .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 489 AND "topic_users"."user_id" = 937
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
100) UserNotifications user quoted .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 490 AND "topic_users"."user_id" = 938
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
101) UserNotifications user quoted .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 491 AND "topic_users"."user_id" = 939
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
102) UserNotifications user quoted .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 492 AND "topic_users"."user_id" = 940
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
103) UserNotifications user quoted reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 493 AND "topic_users"."user_id" = 941
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
104) UserNotifications user posted .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 494 AND "topic_users"."user_id" = 942
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
105) UserNotifications user posted .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 495 AND "topic_users"."user_id" = 943
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
106) UserNotifications user posted .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 496 AND "topic_users"."user_id" = 944
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
107) UserNotifications user posted .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 497 AND "topic_users"."user_id" = 945
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
108) UserNotifications user posted .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 498 AND "topic_users"."user_id" = 946
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
109) UserNotifications user posted .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 499 AND "topic_users"."user_id" = 947
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
110) UserNotifications user posted .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 500 AND "topic_users"."user_id" = 948
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
111) UserNotifications user posted .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 501 AND "topic_users"."user_id" = 949
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
112) UserNotifications user posted .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 502 AND "topic_users"."user_id" = 950
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
113) UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 503 AND "topic_users"."user_id" = 951
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
114) UserNotifications.user_replied generates a correct email
Failure/Error: mail = UserNotifications.user_replied(response.user, post: response, notification: notification)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 504 AND "topic_users"."user_id" = 957
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:59:in `block (3 levels) in <top (required)>'
115) SystemMessage send should create a post correctly
Failure/Error: let(:post) { system_message.create(:welcome_invite) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 521, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 521 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./lib/system_message.rb:31:in `create'
# ./spec/components/system_message_spec.rb:13:in `block (3 levels) in <top (required)>'
# ./spec/components/system_message_spec.rb:17:in `block (3 levels) in <top (required)>'
116) TopicTrackingState can correctly publish unread
Failure/Error: create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 535, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 535 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_tracking_state_spec.rb:10:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_tracking_state_spec.rb:15:in `block (2 levels) in <top (required)>'
117) TopicTrackingState correctly gets the tracking state
Failure/Error: create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 536, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 536 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_tracking_state_spec.rb:10:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_tracking_state_spec.rb:22:in `block (2 levels) in <top (required)>'
118) ListController indexes allows users to filter on a set of topic ids
Failure/Error: p = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 571, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 571 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/controllers/list_controller_spec.rb:30:in `block (3 levels) in <top (required)>'
119) TopicStatusUpdate avoids notifying on automatically closed topics
Failure/Error: post = PostCreator.create(user,
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 695, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 695 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/models/topic_status_update_spec.rb:10:in `block (2 levels) in <top (required)>'
120) PostAction flag counts should ignore validated flags
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 723, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 723 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:89:in `block (3 levels) in <top (required)>'
121) PostAction messaging notify moderators integration test
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 730, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 730 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:19:in `block (3 levels) in <top (required)>'
122) PostAction flagging should follow the rules for automatic hiding workflow
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 733, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 733 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:234:in `block (3 levels) in <top (required)>'
123) PostAction flagging flag_counts_for returns the correct flag counts
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 737, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 737 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:183:in `block (4 levels) in <top (required)>'
124) UserAction when a user posts a new topic when another user posts on the topic should log user actions correctly
Failure/Error: @response = Fabricate(:post, reply_to_post_number: 1, topic: @post.topic, user: @other_user, raw: "perhaps @#{@mentioned.username} knows how this works?")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 774 AND "topic_users"."user_id" = 1367
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:24:in `replied'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:124:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/user_action_spec.rb:175:in `block (4 levels) in <top (required)>'
125) UserAction when a user posts a new topic when another user posts on the topic should not log a double notification for a post edit
Failure/Error: @response = Fabricate(:post, reply_to_post_number: 1, topic: @post.topic, user: @other_user, raw: "perhaps @#{@mentioned.username} knows how this works?")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 775 AND "topic_users"."user_id" = 1370
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:24:in `replied'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:124:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/user_action_spec.rb:175:in `block (4 levels) in <top (required)>'
126) Jobs::PeriodicalUpdates calculates scores
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
127) Jobs::PeriodicalUpdates calculates avg topic time
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
128) Jobs::PeriodicalUpdates features topics
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
129) Jobs::PeriodicalUpdates calculates avg post time
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
130) Jobs::PeriodicalUpdates updates view counts
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
131) Jobs::PeriodicalUpdates refreshes hot topics
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
132) TopTopic
Failure/Error: it { should belong_to :topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 5: WHERE a.attrelid = '"top_topics"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"top_topics"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
# ./spec/models/top_topic_spec.rb:5:in `block (2 levels) in <top (required)>'
133) TopTopic refresh! begins blank
Failure/Error: TopTopic.all.should be_blank
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: SELECT "top_topics".* FROM "top_topics"
^
: SELECT "top_topics".* FROM "top_topics"
# ./spec/models/top_topic_spec.rb:13:in `block (3 levels) in <top (required)>'
134) TopTopic refresh! after calculating should have top topics
Failure/Error: TopTopic.refresh!
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./spec/models/top_topic_spec.rb:19:in `block (4 levels) in <top (required)>'
135) PostCreator private message acts correctly
Failure/Error: PostCreator.create(user, title: 'hi there welcome to my topic',
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 786, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 786 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:313:in `block (3 levels) in <top (required)>'
# ./spec/components/post_creator_spec.rb:320:in `block (3 levels) in <top (required)>'
136) PostCreator cooking options passes the cooking options through correctly
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 789, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 789 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:303:in `block (3 levels) in <top (required)>'
137) PostCreator word_count has a word count
Failure/Error: post = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 790, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 790 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:401:in `block (3 levels) in <top (required)>'
138) PostCreator setting created_at acts correctly
Failure/Error: PostCreator.create(user,
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 791, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 791 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:371:in `block (3 levels) in <top (required)>'
# ./spec/components/post_creator_spec.rb:385:in `block (3 levels) in <top (required)>'
139) PostCreator private message to group acts correctly
Failure/Error: PostCreator.create(user, title: 'hi there welcome to my topic',
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 792, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 792 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:349:in `block (3 levels) in <top (required)>'
# ./spec/components/post_creator_spec.rb:356:in `block (3 levels) in <top (required)>'
140) PostCreator disable validations can save a post
Failure/Error: post = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 793, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 793 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:393:in `block (3 levels) in <top (required)>'
141) PostCreator new topic can be created with auto tracking disabled
Failure/Error: p = PostCreator.create(user, basic_topic_params.merge(auto_track: false))
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 794, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 794 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:25:in `block (3 levels) in <top (required)>'
142) PostCreator new topic when auto-close param is given ensures the user can auto-close the topic, but ignores auto-close param silently
Failure/Error: post = PostCreator.new(user, basic_topic_params.merge(auto_close_time: 2)).create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 795, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 795 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:192:in `block (4 levels) in <top (required)>'
143) PostCreator new topic success increases topic response counts
Failure/Error: first_post = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 796, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 796 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:167:in `block (4 levels) in <top (required)>'
144) PostCreator new topic success queues up post processing job when saved
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 797, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 797 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:136:in `block (4 levels) in <top (required)>'
145) PostCreator new topic success generates the correct messages for a secure topic
Failure/Error: created_post = PostCreator.new(admin, basic_topic_params.merge(category: cat.id)).create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 799, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 799 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:89:in `block (5 levels) in <top (required)>'
# ./spec/support/diagnostics_helper.rb:15:in `track_publish'
# ./spec/components/post_creator_spec.rb:88:in `block (4 levels) in <top (required)>'
146) PostCreator new topic success passes the image sizes through
Failure/Error: creator_with_image_sizes.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 800, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 800 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:163:in `block (4 levels) in <top (required)>'
147) PostCreator new topic success extracts links from the post
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 801, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 801 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:130:in `block (4 levels) in <top (required)>'
148) PostCreator new topic success adds meta data from the post
Failure/Error: creator_with_meta_data.create.topic.meta_data['hello'].should == 'world'
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 802, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 802 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:158:in `block (4 levels) in <top (required)>'
149) PostCreator new topic success passes the image_sizes along to the job if present
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 803, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 803 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:150:in `block (4 levels) in <top (required)>'
150) PostCreator new topic success passes the invalidate_oneboxes along to the job if present
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 804, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 804 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:143:in `block (4 levels) in <top (required)>'
151) PostCreator new topic success assigns a category when supplied
Failure/Error: creator_with_category.create.topic.category.should == category
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 806, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 806 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:154:in `block (4 levels) in <top (required)>'
152) PostCreator new topic success doesn't return true for spam
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 807, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 807 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:61:in `block (4 levels) in <top (required)>'
153) PostCreator new topic success generates the correct messages for a normal topic
Failure/Error: p = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 808, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 808 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:112:in `block (5 levels) in <top (required)>'
# ./spec/support/diagnostics_helper.rb:15:in `track_publish'
# ./spec/components/post_creator_spec.rb:111:in `block (4 levels) in <top (required)>'
154) PostCreator new topic success does not notify on system messages
Failure/Error: p = PostCreator.create(admin, basic_topic_params.merge(post_type: Post.types[:moderator_action]))
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 809, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 809 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:68:in `block (5 levels) in <top (required)>'
# ./spec/support/diagnostics_helper.rb:15:in `track_publish'
# ./spec/components/post_creator_spec.rb:67:in `block (4 levels) in <top (required)>'
155) PostCreator new topic invalid raw has errors
Failure/Error: creator_invalid_raw.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 810, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 810 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:52:in `block (4 levels) in <top (required)>'
156) Topic limits new users to max_topics_in_first_day and max_posts_in_first_day
Failure/Error: topic_id = create_post(user: user).topic_id
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 889, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 889 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_spec.rb:1286:in `block (2 levels) in <top (required)>'
157) Topic last_poster info initially has the last_post_user_id of the OP
Failure/Error: @post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 949, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 949 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_spec.rb:633:in `block (3 levels) in <top (required)>'
158) Topic last_poster info after a second post updates the last_post_user_id to the second_user
Failure/Error: @post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 950, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 950 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_spec.rb:633:in `block (3 levels) in <top (required)>'
159) TopicView handles deleted topics
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1055, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1055 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:22:in `block (2 levels) in <top (required)>'
160) TopicView raises an error if the user can't see the topic
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1056, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1056 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:17:in `block (2 levels) in <top (required)>'
161) TopicView with a few sample posts provides a summary of the first post
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1057, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1057 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
162) TopicView with a few sample posts provides an absolute url
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1058, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1058 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
163) TopicView with a few sample posts raises NotLoggedIn if the user isn't logged in and is trying to view a private message
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1059, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1059 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
164) TopicView with a few sample posts it can find the best responses
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1060, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1060 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
165) TopicView with a few sample posts .topic_user returns nil when there is no user
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1061, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1061 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
166) TopicView with a few sample posts .participants returns the two participants hashed by id
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1062, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1062 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
167) TopicView with a few sample posts .post_counts_by_user returns the two posters with their counts
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1063, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1063 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
168) TopicView with a few sample posts #next_page should return the next page
Failure/Error: topic = create_topic
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1064, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1064 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:129:in `block (4 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
169) TopicView with a few sample posts .all_post_actions is blank at first
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1065, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1065 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
170) TopicView with a few sample posts .all_post_actions returns the like
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1066, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1066 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
171) TopicView with a few sample posts #recent_posts returns at most 25 recent posts ordered newest first
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1067, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1067 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
172) TopicView with a few sample posts .read? tracks correctly
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1068, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1068 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
173) TopicView.posts filter_posts_near returns deleted posts by nuked users to an admin
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1071, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1071 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
174) TopicView.posts filter_posts_near snaps to the upper boundary
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1072, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1072 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
175) TopicView.posts filter_posts_near returns the posts in the middle
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1073, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1073 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
176) TopicView.posts filter_posts_near returns deleted posts to an admin
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1074, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1074 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
177) TopicView.posts filter_posts_near snaps to the lower boundary
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1075, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1075 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
178) TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns all the posts
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1076, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1076 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
179) TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns deleted posts to admins
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1077, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1077 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
180) TopicView.posts #filter_posts_paged returns correct posts for all pages
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1078, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1078 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
181) TopicView.posts contains_gaps? contains contains_gaps when filtered by best
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1079, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1079 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
182) TopicView.posts contains_gaps? contains contains_gaps when filtered by summary
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1080, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1080 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
183) TopicView.posts contains_gaps? contains contains_gaps when filtered by username
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1081, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1081 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
184) TopicView.posts contains_gaps? does not contain contains_gaps with default filtering
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1082, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1082 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
185) TopicUser change a flag triggers the observer callbacks when updating
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1084, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1084 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:207:in `block (4 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:207:in `times'
# ./spec/models/topic_user_spec.rb:207:in `block (3 levels) in <top (required)>'
186) TopicUser change a flag only inserts a row once, even on repeated calls
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1085, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1085 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:196:in `block (3 levels) in <top (required)>'
187) TopicUser change a flag creates a forum topic user record
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1086, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1086 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:187:in `block (3 levels) in <top (required)>'
188) TopicUser change a flag after creating a row has a key in the lookup for this forum topic
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1087, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1087 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:212:in `block (4 levels) in <top (required)>'
189) TopicUser change a flag after creating a row has a lookup
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1088, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1088 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:212:in `block (4 levels) in <top (required)>'
190) TopicUser change a flag after creating a row has the correct starred value
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1089, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1089 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:212:in `block (4 levels) in <top (required)>'
191) TopicUser notifications should have the correct reason for a user change when set to regular
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1090, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1090 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:76:in `block (3 levels) in <top (required)>'
192) TopicUser notifications reason should reset when changed
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1091, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1091 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:57:in `block (3 levels) in <top (required)>'
193) TopicUser notifications should be set to "regular" notifications, by default on non creators
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1092, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1092 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:52:in `block (3 levels) in <top (required)>'
194) TopicUser notifications should reset regular topics to tracking topics if auto track is changed
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1093, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1093 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:45:in `block (3 levels) in <top (required)>'
195) TopicUser notifications should have the correct reason for a user change when watched
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1094, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1094 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:62:in `block (3 levels) in <top (required)>'
196) TopicUser notifications should watch topics a user created
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1095, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1095 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:16:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:83:in `block (3 levels) in <top (required)>'
197) TopicUser notifications should have the correct reason for a user change when set to regular
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1096, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1096 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:69:in `block (3 levels) in <top (required)>'
198) TopicUser notifications should be set to tracking if auto_track_topics is enabled
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1097, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1097 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:40:in `block (3 levels) in <top (required)>'
199) TopicUser visited at triggers the observer callbacks when updating
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1098, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1098 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:91:in `block (3 levels) in <top (required)>'
200) TopicUser visited at updates upon repeat visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1099, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1099 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:91:in `block (3 levels) in <top (required)>'
201) TopicUser visited at set upon initial visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1100, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1100 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:91:in `block (3 levels) in <top (required)>'
202) TopicUser unpinned defaults to blank
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1101, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1101 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:27:in `block (3 levels) in <top (required)>'
203) TopicUser read tracking without auto tracking should create a new record for a visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1102, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1102 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:124:in `block (4 levels) in <top (required)>'
204) TopicUser read tracking without auto tracking should update the record for repeat visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1103, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1103 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:124:in `block (4 levels) in <top (required)>'
205) TopicUser read tracking auto tracking should not automatically track topics after they are read for long enough if changed manually
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1104, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1104 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
206) TopicUser read tracking auto tracking should automatically track topics after they are read for long enough
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1105, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1105 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
207) TopicUser read tracking auto tracking should not automatically track topics you reply to and have set state manually
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1106, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1106 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
208) TopicUser read tracking auto tracking should automatically track topics you reply to
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1107, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1107 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
209) TopicUser auto_watch_new_topic auto watches topics when called
Failure/Error: user2 = Fabricate(:user, watch_new_topics: true)
ActiveRecord::UnknownAttributeError:
unknown attribute: watch_new_topics
# ./spec/models/topic_user_spec.rb:263:in `block (3 levels) in <top (required)>'
210) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the first time an import is run it should behave like a successful call to execute should indicate that an import is running
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:207
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:185:in `block (7 levels) in <top (required)>'
211) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should take the site out of maintenance mode when it's done
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
212) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should have a users table that's empty
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
213) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should indicate that an import is running
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
214) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should put the site in maintenance mode
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
215) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should make a backup of the users table
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
216) Jobs::FeatureTopicUsers with a topic won't feature the last poster
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1267, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1267 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
217) Jobs::FeatureTopicUsers with a topic will not feature the second poster if we supply their post to be ignored
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1268, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1268 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
218) Jobs::FeatureTopicUsers with a topic features the second poster
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1269, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1269 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
219) Jobs::FeatureTopicUsers with a topic won't feature the OP
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1270, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1270 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
220) Jobs::FeatureTopicUsers participant count it works as expected
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1271, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1271 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:47:in `block (3 levels) in <top (required)>'
221) PostsController recover a post when logged in recovers a post correctly
Failure/Error: topic_id = create_post.topic_id
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1273, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1273 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/controllers/posts_controller_spec.rb:116:in `block (4 levels) in <top (required)>'
222) PostsController creating a post when logged in protects against dupes
Failure/Error: xhr :post, :create, {raw: 'this is a test post 123', title: 'this is a test title 123', wpid: 1}
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1281, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1281 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./app/controllers/posts_controller.rb:36:in `block in create'
# ./lib/distributed_memoizer.rb:28:in `memoize'
# ./app/controllers/posts_controller.rb:34:in `create'
# ./spec/controllers/posts_controller_spec.rb:295:in `block (4 levels) in <top (required)>'
223) UsersController.show returns success
Failure/Error: xhr :get, :show, username: user.username
NoMethodError:
undefined method `watch_new_topics' for #<User:0x14bf91b8>
# (eval):31:in `_fast_attributes'
# ./app/controllers/users_controller.rb:30:in `block (2 levels) in show'
# ./app/controllers/users_controller.rb:28:in `show'
# ./spec/controllers/users_controller_spec.rb:14:in `block (3 levels) in <top (required)>'
224) UsersController#update with authenticated user with permission to update allows the update
Failure/Error: put :update, username: user.username, name: 'Jim Tom'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x152c6fb8>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:238:in `json_result'
# ./app/controllers/users_controller.rb:46:in `update'
# ./spec/controllers/users_controller_spec.rb:964:in `block (5 levels) in <top (required)>'
225) UsersController#update with authenticated user with permission to update returns user JSON
Failure/Error: put :update, username: user.username
NoMethodError:
undefined method `watch_new_topics' for #<User:0x12d39f0c>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:238:in `json_result'
# ./app/controllers/users_controller.rb:46:in `update'
# ./spec/controllers/users_controller_spec.rb:973:in `block (5 levels) in <top (required)>'
226) CategoryFeaturedTopic feature_topics_for should feature topics for a secure category
Failure/Error: let!(:category_post) { PostCreator.create(user, raw: "I put this post in the category", title: "categorize THIS", category: category.id) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1312, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1312 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/models/category_featured_topic_spec.rb:11:in `block (3 levels) in <top (required)>'
227) CategoryFeaturedTopic feature_topics_for should not include invisible topics
Failure/Error: let!(:category_post) { PostCreator.create(user, raw: "I put this post in the category", title: "categorize THIS", category: category.id) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1314, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1314 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/models/category_featured_topic_spec.rb:11:in `block (3 levels) in <top (required)>'
Finished in 6 minutes 29 seconds
3328 examples, 227 failures
Failed examples:
rspec ./spec/models/category_spec.rb:335 # Category update_stats with revised post doesn't count each version of a post
rspec ./spec/models/category_spec.rb:291 # Category update_stats with regular topics updates topic stats
rspec ./spec/models/category_spec.rb:255 # Category latest should be updated correctly
rspec ./spec/controllers/session_controller_spec.rb:70 # SessionController.create when email is confirmed also allow login by email sets a session id
rspec ./spec/controllers/session_controller_spec.rb:49 # SessionController.create when email is confirmed success by username sets a cookie with the auth token
rspec ./spec/controllers/session_controller_spec.rb:45 # SessionController.create when email is confirmed success by username gives the user an auth token
rspec ./spec/controllers/session_controller_spec.rb:41 # SessionController.create when email is confirmed success by username sets a session id
rspec ./spec/controllers/session_controller_spec.rb:60 # SessionController.create when email is confirmed strips leading @ symbol sets a session id
rspec ./spec/controllers/session_controller_spec.rb:117 # SessionController.create when email is confirmed when the site requires approval of users with an unapproved user who is an admin sets a session id
rspec ./spec/controllers/session_controller_spec.rb:79 # SessionController.create when email is confirmed login has leading and trailing space strips spaces from the username
rspec ./spec/controllers/session_controller_spec.rb:84 # SessionController.create when email is confirmed login has leading and trailing space strips spaces from the email
rspec ./spec/models/user_spec.rb:737 # User flag_linked_posts_as_spam has flagged all the user's posts as spam
rspec ./spec/integration/spam_rules_spec.rb:89 # SpamRulesEnforcer auto-blocking users based on flagging spammer has trust level basic one spam post is flagged enough times by enough users Then { expect(spam_post.reload).to_not be_hidden }
rspec ./spec/integration/spam_rules_spec.rb:26 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times Then { expect(spam_post.reload).to_not be_hidden }
rspec ./spec/integration/spam_rules_spec.rb:75 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times flags_required_to_hide_post takes effect too Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:46 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:68 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users spammer becomes a basic user Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:63 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post is deleted Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:58 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post's flags are cleared Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:30 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times spam posts are flagged enough times, but not by enough users Then { expect(spam_post.reload).to_not be_hidden }
rspec ./spec/jobs/exporter_spec.rb:153 # Jobs::Exporter execute when no export or import is running when it finishes successfully and a user was given should send a notification to the user who started the export
rspec ./spec/components/post_destroyer_spec.rb:283 # PostDestroyer post actions should update flag counts on the post
rspec ./spec/components/post_destroyer_spec.rb:276 # PostDestroyer post actions should delete the post actions
rspec ./spec/components/post_destroyer_spec.rb:271 # PostDestroyer post actions should reset counts when a post is deleted
rspec ./spec/components/post_destroyer_spec.rb:198 # PostDestroyer deleting a post belonging to a deleted topic as a moderator deletes the post
rspec ./spec/components/post_destroyer_spec.rb:209 # PostDestroyer deleting a post belonging to a deleted topic as an admin deletes the post
rspec ./spec/components/post_destroyer_spec.rb:157 # PostDestroyer deleting the second post in a topic resets the last_poster_id back to the OP
rspec ./spec/components/post_destroyer_spec.rb:161 # PostDestroyer deleting the second post in a topic resets the last_posted_at back to the OP
rspec ./spec/components/post_destroyer_spec.rb:177 # PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
rspec ./spec/components/post_destroyer_spec.rb:173 # PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
rspec ./spec/components/post_destroyer_spec.rb:169 # PostDestroyer deleting the second post in a topic topic_user clears the posted flag for the second user
rspec ./spec/components/post_destroyer_spec.rb:97 # PostDestroyer basic destroying as the creator of the post, doesn't delete the post
rspec ./spec/components/post_destroyer_spec.rb:126 # PostDestroyer basic destroying as a moderator deletes the post
rspec ./spec/components/post_destroyer_spec.rb:137 # PostDestroyer basic destroying as an admin deletes the post
rspec ./spec/components/post_destroyer_spec.rb:221 # PostDestroyer after delete should feature the users again (in case they've changed)
rspec ./spec/components/post_destroyer_spec.rb:245 # PostDestroyer after delete with a reply should increase the post_number when there are deletion gaps
rspec ./spec/components/post_destroyer_spec.rb:239 # PostDestroyer after delete with a reply lowers the reply_count when the reply is deleted
rspec ./spec/components/post_destroyer_spec.rb:231 # PostDestroyer after delete with a reply changes the post count of the topic
rspec ./spec/components/post_destroyer_spec.rb:259 # PostDestroyer @mentions removes notifications when deleted
rspec ./spec/components/post_destroyer_spec.rb:15 # PostDestroyer destroy_old_stubs destroys stubs for deleted by user posts
rspec ./spec/components/post_destroyer_spec.rb:58 # PostDestroyer destroy_old_stubs uses the delete_removed_posts_after site setting
rspec ./spec/models/notification_spec.rb:132 # Notification private message should create a private message notification
rspec ./spec/models/notification_spec.rb:136 # Notification private message should not add a pm notification for the creator
rspec ./spec/models/notification_spec.rb:146 # Notification.post returns the post
rspec ./spec/models/notification_spec.rb:40 # Notification post watching does notify watching users of new posts
rspec ./spec/models/notification_spec.rb:26 # Notification post replies notifies the poster on reply
rspec ./spec/components/topic_query_spec.rb:338 # TopicQuery list_posted created topics includes the created topic
rspec ./spec/components/topic_query_spec.rb:347 # TopicQuery list_posted topic you've posted in includes the posted topic
rspec ./spec/integration/same_ip_spammers_spec.rb:17 # SpamRulesEnforcer flag_sockpuppets is disabled Then { first_post.reload.spam_count.should == 0 }
rspec ./spec/integration/same_ip_spammers_spec.rb:30 # SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies Then { first_post.reload.spam_count.should == 1 }
rspec ./spec/integration/same_ip_spammers_spec.rb:36 # SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies third spam post Then { first_post.reload.spam_count.should == 1 }
rspec ./spec/integration/same_ip_spammers_spec.rb:52 # SpamRulesEnforcer flag_sockpuppets is enabled first user is not new first user starts a topic a reply by a new user at the same IP address Then { first_post.reload.spam_count.should == 0 }
rspec ./spec/components/flag_query_spec.rb:9 # FlagQuery flagged_posts_report operates correctly
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user replied .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user replied .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user replied .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user replied .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user replied .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user replied .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user replied .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user replied .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user replied .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user replied reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user mentioned email .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user mentioned email .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user mentioned email .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user mentioned email .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user mentioned email .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user mentioned email .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user mentioned email .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user mentioned email .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user mentioned email .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user mentioned email reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user invited to a private message .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user invited to a private message .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user invited to a private message .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user invited to a private message .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user invited to a private message .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user invited to a private message .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user invited to a private message .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user invited to a private message .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user invited to a private message .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:89 # UserNotifications user invited to a private message reply_by_email doesn't support reply by email
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user posted .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user posted .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user posted .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user posted .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user posted .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user posted .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user posted .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user posted .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user posted .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user quoted .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user quoted .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user quoted .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user quoted .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user quoted .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user quoted .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user quoted .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user quoted .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user quoted .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user quoted reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user posted .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user posted .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user posted .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user posted .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user posted .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user posted .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user posted .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user posted .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user posted .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:58 # UserNotifications.user_replied generates a correct email
rspec ./spec/components/system_message_spec.rb:16 # SystemMessage send should create a post correctly
rspec ./spec/models/topic_tracking_state_spec.rb:13 # TopicTrackingState can correctly publish unread
rspec ./spec/models/topic_tracking_state_spec.rb:18 # TopicTrackingState correctly gets the tracking state
rspec ./spec/controllers/list_controller_spec.rb:29 # ListController indexes allows users to filter on a set of topic ids
rspec ./spec/models/topic_status_update_spec.rb:7 # TopicStatusUpdate avoids notifying on automatically closed topics
rspec ./spec/models/post_action_spec.rb:88 # PostAction flag counts should ignore validated flags
rspec ./spec/models/post_action_spec.rb:18 # PostAction messaging notify moderators integration test
rspec ./spec/models/post_action_spec.rb:233 # PostAction flagging should follow the rules for automatic hiding workflow
rspec ./spec/models/post_action_spec.rb:182 # PostAction flagging flag_counts_for returns the correct flag counts
rspec ./spec/models/user_action_spec.rb:178 # UserAction when a user posts a new topic when another user posts on the topic should log user actions correctly
rspec ./spec/models/user_action_spec.rb:185 # UserAction when a user posts a new topic when another user posts on the topic should not log a double notification for a post edit
rspec ./spec/jobs/periodical_updates_spec.rb:26 # Jobs::PeriodicalUpdates calculates scores
rspec ./spec/jobs/periodical_updates_spec.rb:14 # Jobs::PeriodicalUpdates calculates avg topic time
rspec ./spec/jobs/periodical_updates_spec.rb:18 # Jobs::PeriodicalUpdates features topics
rspec ./spec/jobs/periodical_updates_spec.rb:10 # Jobs::PeriodicalUpdates calculates avg post time
rspec ./spec/jobs/periodical_updates_spec.rb:22 # Jobs::PeriodicalUpdates updates view counts
rspec ./spec/jobs/periodical_updates_spec.rb:32 # Jobs::PeriodicalUpdates refreshes hot topics
rspec ./spec/models/top_topic_spec.rb:5 # TopTopic
rspec ./spec/models/top_topic_spec.rb:12 # TopTopic refresh! begins blank
rspec ./spec/models/top_topic_spec.rb:22 # TopTopic refresh! after calculating should have top topics
rspec ./spec/components/post_creator_spec.rb:319 # PostCreator private message acts correctly
rspec ./spec/components/post_creator_spec.rb:296 # PostCreator cooking options passes the cooking options through correctly
rspec ./spec/components/post_creator_spec.rb:399 # PostCreator word_count has a word count
rspec ./spec/components/post_creator_spec.rb:384 # PostCreator setting created_at acts correctly
rspec ./spec/components/post_creator_spec.rb:355 # PostCreator private message to group acts correctly
rspec ./spec/components/post_creator_spec.rb:391 # PostCreator disable validations can save a post
rspec ./spec/components/post_creator_spec.rb:24 # PostCreator new topic can be created with auto tracking disabled
rspec ./spec/components/post_creator_spec.rb:190 # PostCreator new topic when auto-close param is given ensures the user can auto-close the topic, but ignores auto-close param silently
rspec ./spec/components/post_creator_spec.rb:166 # PostCreator new topic success increases topic response counts
rspec ./spec/components/post_creator_spec.rb:133 # PostCreator new topic success queues up post processing job when saved
rspec ./spec/components/post_creator_spec.rb:77 # PostCreator new topic success generates the correct messages for a secure topic
rspec ./spec/components/post_creator_spec.rb:161 # PostCreator new topic success passes the image sizes through
rspec ./spec/components/post_creator_spec.rb:128 # PostCreator new topic success extracts links from the post
rspec ./spec/components/post_creator_spec.rb:157 # PostCreator new topic success adds meta data from the post
rspec ./spec/components/post_creator_spec.rb:146 # PostCreator new topic success passes the image_sizes along to the job if present
rspec ./spec/components/post_creator_spec.rb:139 # PostCreator new topic success passes the invalidate_oneboxes along to the job if present
rspec ./spec/components/post_creator_spec.rb:153 # PostCreator new topic success assigns a category when supplied
rspec ./spec/components/post_creator_spec.rb:60 # PostCreator new topic success doesn't return true for spam
rspec ./spec/components/post_creator_spec.rb:108 # PostCreator new topic success generates the correct messages for a normal topic
rspec ./spec/components/post_creator_spec.rb:65 # PostCreator new topic success does not notify on system messages
rspec ./spec/components/post_creator_spec.rb:51 # PostCreator new topic invalid raw has errors
rspec ./spec/models/topic_spec.rb:1275 # Topic limits new users to max_topics_in_first_day and max_posts_in_first_day
rspec ./spec/models/topic_spec.rb:638 # Topic last_poster info initially has the last_post_user_id of the OP
rspec ./spec/models/topic_spec.rb:649 # Topic last_poster info after a second post updates the last_post_user_id to the second_user
rspec ./spec/components/topic_view_spec.rb:21 # TopicView handles deleted topics
rspec ./spec/components/topic_view_spec.rb:16 # TopicView raises an error if the user can't see the topic
rspec ./spec/components/topic_view_spec.rb:101 # TopicView with a few sample posts provides a summary of the first post
rspec ./spec/components/topic_view_spec.rb:97 # TopicView with a few sample posts provides an absolute url
rspec ./spec/components/topic_view_spec.rb:92 # TopicView with a few sample posts raises NotLoggedIn if the user isn't logged in and is trying to view a private message
rspec ./spec/components/topic_view_spec.rb:37 # TopicView with a few sample posts it can find the best responses
rspec ./spec/components/topic_view_spec.rb:186 # TopicView with a few sample posts .topic_user returns nil when there is no user
rspec ./spec/components/topic_view_spec.rb:154 # TopicView with a few sample posts .participants returns the two participants hashed by id
rspec ./spec/components/topic_view_spec.rb:148 # TopicView with a few sample posts .post_counts_by_user returns the two posters with their counts
rspec ./spec/components/topic_view_spec.rb:142 # TopicView with a few sample posts #next_page should return the next page
rspec ./spec/components/topic_view_spec.rb:160 # TopicView with a few sample posts .all_post_actions is blank at first
rspec ./spec/components/topic_view_spec.rb:164 # TopicView with a few sample posts .all_post_actions returns the like
rspec ./spec/components/topic_view_spec.rb:198 # TopicView with a few sample posts #recent_posts returns at most 25 recent posts ordered newest first
rspec ./spec/components/topic_view_spec.rb:171 # TopicView with a few sample posts .read? tracks correctly
rspec ./spec/components/topic_view_spec.rb:297 # TopicView.posts filter_posts_near returns deleted posts by nuked users to an admin
rspec ./spec/components/topic_view_spec.rb:278 # TopicView.posts filter_posts_near snaps to the upper boundary
rspec ./spec/components/topic_view_spec.rb:284 # TopicView.posts filter_posts_near returns the posts in the middle
rspec ./spec/components/topic_view_spec.rb:290 # TopicView.posts filter_posts_near returns deleted posts to an admin
rspec ./spec/components/topic_view_spec.rb:272 # TopicView.posts filter_posts_near snaps to the lower boundary
rspec ./spec/components/topic_view_spec.rb:307 # TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns all the posts
rspec ./spec/components/topic_view_spec.rb:312 # TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns deleted posts to admins
rspec ./spec/components/topic_view_spec.rb:258 # TopicView.posts #filter_posts_paged returns correct posts for all pages
rspec ./spec/components/topic_view_spec.rb:248 # TopicView.posts contains_gaps? contains contains_gaps when filtered by best
rspec ./spec/components/topic_view_spec.rb:244 # TopicView.posts contains_gaps? contains contains_gaps when filtered by summary
rspec ./spec/components/topic_view_spec.rb:240 # TopicView.posts contains_gaps? contains contains_gaps when filtered by username
rspec ./spec/components/topic_view_spec.rb:236 # TopicView.posts contains_gaps? does not contain contains_gaps with default filtering
rspec ./spec/models/topic_user_spec.rb:205 # TopicUser change a flag triggers the observer callbacks when updating
rspec ./spec/models/topic_user_spec.rb:194 # TopicUser change a flag only inserts a row once, even on repeated calls
rspec ./spec/models/topic_user_spec.rb:186 # TopicUser change a flag creates a forum topic user record
rspec ./spec/models/topic_user_spec.rb:223 # TopicUser change a flag after creating a row has a key in the lookup for this forum topic
rspec ./spec/models/topic_user_spec.rb:219 # TopicUser change a flag after creating a row has a lookup
rspec ./spec/models/topic_user_spec.rb:215 # TopicUser change a flag after creating a row has the correct starred value
rspec ./spec/models/topic_user_spec.rb:75 # TopicUser notifications should have the correct reason for a user change when set to regular
rspec ./spec/models/topic_user_spec.rb:56 # TopicUser notifications reason should reset when changed
rspec ./spec/models/topic_user_spec.rb:51 # TopicUser notifications should be set to "regular" notifications, by default on non creators
rspec ./spec/models/topic_user_spec.rb:44 # TopicUser notifications should reset regular topics to tracking topics if auto track is changed
rspec ./spec/models/topic_user_spec.rb:61 # TopicUser notifications should have the correct reason for a user change when watched
rspec ./spec/models/topic_user_spec.rb:82 # TopicUser notifications should watch topics a user created
rspec ./spec/models/topic_user_spec.rb:68 # TopicUser notifications should have the correct reason for a user change when set to regular
rspec ./spec/models/topic_user_spec.rb:38 # TopicUser notifications should be set to tracking if auto_track_topics is enabled
rspec ./spec/models/topic_user_spec.rb:113 # TopicUser visited at triggers the observer callbacks when updating
rspec ./spec/models/topic_user_spec.rb:101 # TopicUser visited at updates upon repeat visit
rspec ./spec/models/topic_user_spec.rb:94 # TopicUser visited at set upon initial visit
rspec ./spec/models/topic_user_spec.rb:30 # TopicUser unpinned defaults to blank
rspec ./spec/models/topic_user_spec.rb:129 # TopicUser read tracking without auto tracking should create a new record for a visit
rspec ./spec/models/topic_user_spec.rb:137 # TopicUser read tracking without auto tracking should update the record for repeat visit
rspec ./spec/models/topic_user_spec.rb:176 # TopicUser read tracking auto tracking should not automatically track topics after they are read for long enough if changed manually
rspec ./spec/models/topic_user_spec.rb:170 # TopicUser read tracking auto tracking should automatically track topics after they are read for long enough
rspec ./spec/models/topic_user_spec.rb:163 # TopicUser read tracking auto tracking should not automatically track topics you reply to and have set state manually
rspec ./spec/models/topic_user_spec.rb:157 # TopicUser read tracking auto tracking should automatically track topics you reply to
rspec ./spec/models/topic_user_spec.rb:261 # TopicUser auto_watch_new_topic auto watches topics when called
rspec ./spec/jobs/importer_spec.rb:181 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the first time an import is run it should behave like a successful call to execute should indicate that an import is running
rspec ./spec/jobs/importer_spec.rb:197 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should take the site out of maintenance mode when it's done
rspec ./spec/jobs/importer_spec.rb:174 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should have a users table that's empty
rspec ./spec/jobs/importer_spec.rb:181 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should indicate that an import is running
rspec ./spec/jobs/importer_spec.rb:188 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should put the site in maintenance mode
rspec ./spec/jobs/importer_spec.rb:167 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should make a backup of the users table
rspec ./spec/jobs/feature_topic_users_spec.rb:38 # Jobs::FeatureTopicUsers with a topic won't feature the last poster
rspec ./spec/jobs/feature_topic_users_spec.rb:33 # Jobs::FeatureTopicUsers with a topic will not feature the second poster if we supply their post to be ignored
rspec ./spec/jobs/feature_topic_users_spec.rb:28 # Jobs::FeatureTopicUsers with a topic features the second poster
rspec ./spec/jobs/feature_topic_users_spec.rb:23 # Jobs::FeatureTopicUsers with a topic won't feature the OP
rspec ./spec/jobs/feature_topic_users_spec.rb:51 # Jobs::FeatureTopicUsers participant count it works as expected
rspec ./spec/controllers/posts_controller_spec.rb:115 # PostsController recover a post when logged in recovers a post correctly
rspec ./spec/controllers/posts_controller_spec.rb:293 # PostsController creating a post when logged in protects against dupes
rspec ./spec/controllers/users_controller_spec.rb:13 # UsersController.show returns success
rspec ./spec/controllers/users_controller_spec.rb:960 # UsersController#update with authenticated user with permission to update allows the update
rspec ./spec/controllers/users_controller_spec.rb:970 # UsersController#update with authenticated user with permission to update returns user JSON
rspec ./spec/models/category_featured_topic_spec.rb:13 # CategoryFeaturedTopic feature_topics_for should feature topics for a secure category
rspec ./spec/models/category_featured_topic_spec.rb:28 # CategoryFeaturedTopic feature_topics_for should not include invisible topics
Randomized with seed 23145
bundle exec rake autospec –order rand:23145
If file watching is not working, you can force polling with: bundle exec rake autospec p l=3
Press [ENTER] to stop the current run
Running Rspec: spec
Seeding uncategorized category!
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
.....................................................................................................................................................FF............FFFFFFFFFFFFFFF..FFFFF.......................FFFFF......F......F..F...FF.........................................................................................................................................................................................F.............F........................................................................................F.......F....................................................................................................................................................................................................................................FF.............................................................................................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF....FFFFFFFFFFFFFFFFFFFFF..........FFFFFFFFFF...................................................................................................................................................................................................................................................................................................................................F.......F....FF...FFFFFFFFFF...................................F.F..F...FF...F.FFFF..FFF..........F.........................................................................................................................................FFFFFF..FFFFFFFFFFFFFFFFFFFF.................F.......................................................................................................................FF.F.......................................................................................FFFFFFFFFFFFFFFFFFFFFFFFF...............................................FFF.FFFF..F..............................................FF......................................................................................................................FF.........................F..........................................................................................................................................................................................F..................FF....F..................F........................................................F.......................F.......F...............F...FFFFF.............................................................................................................................FFF......FFF..FFFFFFFFFFFFFF..F................................................................................FFFFFFF.F.................................F................................................................................................................................................................................................................................................................................................................................................................................................FFF..............................................................................................F..........................................................................................................................FFFF..............................................................F............
Failures:
1) TopicTrackingState can correctly publish unread
Failure/Error: create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 83, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 83 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_tracking_state_spec.rb:10:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_tracking_state_spec.rb:15:in `block (2 levels) in <top (required)>'
2) TopicTrackingState correctly gets the tracking state
Failure/Error: create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 84, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 84 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_tracking_state_spec.rb:10:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_tracking_state_spec.rb:22:in `block (2 levels) in <top (required)>'
3) PostDestroyer destroy_old_stubs destroys stubs for deleted by user posts
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 87, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 87 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:18:in `block (3 levels) in <top (required)>'
4) PostDestroyer destroy_old_stubs uses the delete_removed_posts_after site setting
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 88, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 88 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:60:in `block (3 levels) in <top (required)>'
5) PostDestroyer deleting the second post in a topic resets the last_poster_id back to the OP
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 89, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 89 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
6) PostDestroyer deleting the second post in a topic resets the last_posted_at back to the OP
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 90, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 90 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
7) PostDestroyer deleting the second post in a topic topic_user clears the posted flag for the second user
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 91, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 91 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
8) PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 92, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 92 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
9) PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
Failure/Error: let!(:post) { create_post(user: user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 93, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 93 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:148:in `block (3 levels) in <top (required)>'
10) PostDestroyer basic destroying as the creator of the post, doesn't delete the post
Failure/Error: post2 = create_post # Create it here instead of with "let" so unique_posts_mins can do its thing
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 94, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 94 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:101:in `block (3 levels) in <top (required)>'
11) PostDestroyer basic destroying as a moderator deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 95, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 95 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:123:in `block (4 levels) in <top (required)>'
12) PostDestroyer basic destroying as an admin deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 96, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 96 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:134:in `block (4 levels) in <top (required)>'
13) PostDestroyer @mentions removes notifications when deleted
Failure/Error: let!(:mention_post) { Fabricate(:post, raw: 'Hello @eviltrout')}
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 97 AND "topic_users"."user_id" = 187
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:257:in `block (3 levels) in <top (required)>'
14) PostDestroyer after delete should feature the users again (in case they've changed)
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 98 AND "topic_users"."user_id" = 189
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
15) PostDestroyer after delete with a reply changes the post count of the topic
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 99 AND "topic_users"."user_id" = 191
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
16) PostDestroyer after delete with a reply should increase the post_number when there are deletion gaps
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 100 AND "topic_users"."user_id" = 193
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
17) PostDestroyer after delete with a reply lowers the reply_count when the reply is deleted
Failure/Error: let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 101 AND "topic_users"."user_id" = 195
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:24:in `after_save_post'
# ./app/models/post_alert_observer.rb:7:in `after_save'
# ./spec/components/post_destroyer_spec.rb:219:in `block (3 levels) in <top (required)>'
18) PostDestroyer post actions should reset counts when a post is deleted
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 104, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 104 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:269:in `block (3 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:272:in `block (3 levels) in <top (required)>'
19) PostDestroyer post actions should update flag counts on the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 105, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 105 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:269:in `block (3 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:284:in `block (3 levels) in <top (required)>'
20) PostDestroyer post actions should delete the post actions
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 106, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 106 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:269:in `block (3 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:277:in `block (3 levels) in <top (required)>'
21) PostDestroyer deleting a post belonging to a deleted topic as a moderator deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 107, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 107 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:186:in `block (3 levels) in <top (required)>'
22) PostDestroyer deleting a post belonging to a deleted topic as an admin deletes the post
Failure/Error: let(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 108, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 108 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/post_destroyer_spec.rb:12:in `block (2 levels) in <top (required)>'
# ./spec/components/post_destroyer_spec.rb:186:in `block (3 levels) in <top (required)>'
23) Jobs::FeatureTopicUsers with a topic won't feature the OP
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 129, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 129 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
24) Jobs::FeatureTopicUsers with a topic will not feature the second poster if we supply their post to be ignored
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 130, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 130 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
25) Jobs::FeatureTopicUsers with a topic features the second poster
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 131, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 131 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
26) Jobs::FeatureTopicUsers with a topic won't feature the last poster
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 132, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 132 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:16:in `block (3 levels) in <top (required)>'
27) Jobs::FeatureTopicUsers participant count it works as expected
Failure/Error: let!(:post) { create_post }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 133, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 133 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/jobs/feature_topic_users_spec.rb:47:in `block (3 levels) in <top (required)>'
28) Notification.post returns the post
Failure/Error: let!(:notification) { Fabricate(:notification, user: post.user, topic: post.topic, post_number: post.post_number) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 134 AND "topic_users"."user_id" = 251
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:12:in `mentioned'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./spec/models/notification_spec.rb:144:in `block (3 levels) in <top (required)>'
29) Notification post replies notifies the poster on reply
Failure/Error: @reply = Fabricate(:basic_reply, user: coding_horror, topic: post.topic)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 141 AND "topic_users"."user_id" = 258
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:24:in `replied'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:124:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:28:in `block (5 levels) in <top (required)>'
# ./spec/models/notification_spec.rb:27:in `block (4 levels) in <top (required)>'
30) Notification post watching does notify watching users of new posts
Failure/Error: Fabricate(:post, user: post.user, topic: post.topic)
NoMethodError:
undefined method `last_emailed_post_number' for #<TopicUser:0x146bbf0c>
# ./app/mailers/user_notifications.rb:124:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:16:in `posted'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:135:in `block in notify_post_users'
# ./app/models/post_alert_observer.rb:134:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:45:in `block (5 levels) in <top (required)>'
# ./spec/models/notification_spec.rb:44:in `block (4 levels) in <top (required)>'
31) Notification private message should create a private message notification
Failure/Error: @post = Fabricate(:post, topic: @topic, user: @topic.user)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 147 AND "topic_users"."user_id" = 269
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:91:in `user_private_message'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:50:in `enqueue_private'
# ./app/models/user_email_observer.rb:28:in `private_message'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:63:in `block in after_create_post'
# ./app/models/post_alert_observer.rb:62:in `each'
# ./app/models/post_alert_observer.rb:62:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:128:in `block (3 levels) in <top (required)>'
32) Notification private message should not add a pm notification for the creator
Failure/Error: @post = Fabricate(:post, topic: @topic, user: @topic.user)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 148 AND "topic_users"."user_id" = 271
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:91:in `user_private_message'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:50:in `enqueue_private'
# ./app/models/user_email_observer.rb:28:in `private_message'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:63:in `block in after_create_post'
# ./app/models/post_alert_observer.rb:62:in `each'
# ./app/models/post_alert_observer.rb:62:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/notification_spec.rb:128:in `block (3 levels) in <top (required)>'
33) PostsController creating a post when logged in protects against dupes
Failure/Error: xhr :post, :create, {raw: 'this is a test post 123', title: 'this is a test title 123', wpid: 1}
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 239, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 239 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./app/controllers/posts_controller.rb:36:in `block in create'
# ./lib/distributed_memoizer.rb:28:in `memoize'
# ./app/controllers/posts_controller.rb:34:in `create'
# ./spec/controllers/posts_controller_spec.rb:295:in `block (4 levels) in <top (required)>'
34) PostsController recover a post when logged in recovers a post correctly
Failure/Error: topic_id = create_post.topic_id
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 241, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 241 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/controllers/posts_controller_spec.rb:116:in `block (4 levels) in <top (required)>'
35) ListController indexes allows users to filter on a set of topic ids
Failure/Error: p = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 284, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 284 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/controllers/list_controller_spec.rb:30:in `block (3 levels) in <top (required)>'
36) SystemMessage send should create a post correctly
Failure/Error: let(:post) { system_message.create(:welcome_invite) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 292, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 292 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./lib/system_message.rb:31:in `create'
# ./spec/components/system_message_spec.rb:13:in `block (3 levels) in <top (required)>'
# ./spec/components/system_message_spec.rb:17:in `block (3 levels) in <top (required)>'
37) UserAction when a user posts a new topic when another user posts on the topic should log user actions correctly
Failure/Error: @response = Fabricate(:post, reply_to_post_number: 1, topic: @post.topic, user: @other_user, raw: "perhaps @#{@mentioned.username} knows how this works?")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 442 AND "topic_users"."user_id" = 779
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:24:in `replied'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:124:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/user_action_spec.rb:175:in `block (4 levels) in <top (required)>'
38) UserAction when a user posts a new topic when another user posts on the topic should not log a double notification for a post edit
Failure/Error: @response = Fabricate(:post, reply_to_post_number: 1, topic: @post.topic, user: @other_user, raw: "perhaps @#{@mentioned.username} knows how this works?")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 443 AND "topic_users"."user_id" = 782
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./app/jobs/regular/user_email.rb:56:in `execute'
# ./app/jobs/base.rb:89:in `perform'
# ./app/jobs/base.rb:172:in `enqueue'
# ./app/jobs/base.rb:178:in `enqueue_in'
# ./app/models/user_email_observer.rb:41:in `enqueue'
# ./app/models/user_email_observer.rb:24:in `replied'
# ./app/models/user_email_observer.rb:83:in `delegate_to_email_user'
# ./app/models/user_email_observer.rb:69:in `after_commit'
# ./app/models/post_alert_observer.rb:90:in `create_notification'
# ./app/models/post_alert_observer.rb:116:in `block in notify_users'
# ./app/models/post_alert_observer.rb:115:in `each'
# ./app/models/post_alert_observer.rb:115:in `notify_users'
# ./app/models/post_alert_observer.rb:124:in `notify_post_users'
# ./app/models/post_alert_observer.rb:67:in `after_create_post'
# ./app/models/post_alert_observer.rb:13:in `after_create'
# ./spec/models/user_action_spec.rb:175:in `block (4 levels) in <top (required)>'
39) UserNotifications user replied .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 464 AND "topic_users"."user_id" = 826
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
40) UserNotifications user replied .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 465 AND "topic_users"."user_id" = 827
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
41) UserNotifications user replied .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 466 AND "topic_users"."user_id" = 828
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
42) UserNotifications user replied .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 467 AND "topic_users"."user_id" = 829
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
43) UserNotifications user replied .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 468 AND "topic_users"."user_id" = 830
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
44) UserNotifications user replied .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 469 AND "topic_users"."user_id" = 831
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
45) UserNotifications user replied .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 470 AND "topic_users"."user_id" = 832
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
46) UserNotifications user replied .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 471 AND "topic_users"."user_id" = 833
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
47) UserNotifications user replied .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 472 AND "topic_users"."user_id" = 834
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
48) UserNotifications user replied reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 473 AND "topic_users"."user_id" = 835
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
49) UserNotifications user quoted .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 474 AND "topic_users"."user_id" = 836
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
50) UserNotifications user quoted .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 475 AND "topic_users"."user_id" = 837
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
51) UserNotifications user quoted .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 476 AND "topic_users"."user_id" = 838
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
52) UserNotifications user quoted .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 477 AND "topic_users"."user_id" = 839
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
53) UserNotifications user quoted .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 478 AND "topic_users"."user_id" = 840
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
54) UserNotifications user quoted .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 479 AND "topic_users"."user_id" = 841
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
55) UserNotifications user quoted .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 480 AND "topic_users"."user_id" = 842
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
56) UserNotifications user quoted .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 481 AND "topic_users"."user_id" = 843
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
57) UserNotifications user quoted .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 482 AND "topic_users"."user_id" = 844
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
58) UserNotifications user quoted reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 483 AND "topic_users"."user_id" = 845
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:72:in `user_quoted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
59) UserNotifications user posted .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 484 AND "topic_users"."user_id" = 846
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
60) UserNotifications user posted .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 485 AND "topic_users"."user_id" = 847
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
61) UserNotifications user posted .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 486 AND "topic_users"."user_id" = 848
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
62) UserNotifications user posted .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 487 AND "topic_users"."user_id" = 849
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
63) UserNotifications user posted .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 488 AND "topic_users"."user_id" = 850
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
64) UserNotifications user posted .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 489 AND "topic_users"."user_id" = 851
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
65) UserNotifications user posted .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 490 AND "topic_users"."user_id" = 852
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
66) UserNotifications user posted .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 491 AND "topic_users"."user_id" = 853
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
67) UserNotifications user posted .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 492 AND "topic_users"."user_id" = 854
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
68) UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 493 AND "topic_users"."user_id" = 855
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
69) UserNotifications.user_replied generates a correct email
Failure/Error: mail = UserNotifications.user_replied(response.user, post: response, notification: notification)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 2 WHERE "topic_users"."topic_id" = 494 AND "topic_users"."user_id" = 861
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:67:in `user_replied'
# ./spec/mailers/user_notifications_spec.rb:59:in `block (3 levels) in <top (required)>'
70) UserNotifications user mentioned email .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 496 AND "topic_users"."user_id" = 863
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
71) UserNotifications user mentioned email .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 497 AND "topic_users"."user_id" = 864
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
72) UserNotifications user mentioned email .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 498 AND "topic_users"."user_id" = 865
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
73) UserNotifications user mentioned email .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 499 AND "topic_users"."user_id" = 866
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
74) UserNotifications user mentioned email .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 500 AND "topic_users"."user_id" = 867
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
75) UserNotifications user mentioned email .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 501 AND "topic_users"."user_id" = 868
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
76) UserNotifications user mentioned email .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 502 AND "topic_users"."user_id" = 869
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
77) UserNotifications user mentioned email .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 503 AND "topic_users"."user_id" = 870
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
78) UserNotifications user mentioned email .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 504 AND "topic_users"."user_id" = 871
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
79) UserNotifications user mentioned email reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 505 AND "topic_users"."user_id" = 872
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:77:in `user_mentioned'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
80) UserNotifications user invited to a private message .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 506 AND "topic_users"."user_id" = 873
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
81) UserNotifications user invited to a private message .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 507 AND "topic_users"."user_id" = 874
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
82) UserNotifications user invited to a private message .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 508 AND "topic_users"."user_id" = 875
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
83) UserNotifications user invited to a private message .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 509 AND "topic_users"."user_id" = 876
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
84) UserNotifications user invited to a private message .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 510 AND "topic_users"."user_id" = 877
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
85) UserNotifications user invited to a private message .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 511 AND "topic_users"."user_id" = 878
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
86) UserNotifications user invited to a private message .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 512 AND "topic_users"."user_id" = 879
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
87) UserNotifications user invited to a private message .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 513 AND "topic_users"."user_id" = 880
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
88) UserNotifications user invited to a private message .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 514 AND "topic_users"."user_id" = 881
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
89) UserNotifications user invited to a private message reply_by_email doesn't support reply by email
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 515 AND "topic_users"."user_id" = 882
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:62:in `user_invited_to_private_message'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:90:in `block (4 levels) in <top (required)>'
90) UserNotifications user posted .user_mentioned has an unsubscribe link
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 521 AND "topic_users"."user_id" = 898
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:131:in `block (4 levels) in <top (required)>'
91) UserNotifications user posted .user_mentioned has an post_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 522 AND "topic_users"."user_id" = 899
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:135:in `block (4 levels) in <top (required)>'
92) UserNotifications user posted .user_mentioned has a url
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 523 AND "topic_users"."user_id" = 900
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:115:in `block (4 levels) in <top (required)>'
93) UserNotifications user posted .user_mentioned has an topic_id
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 524 AND "topic_users"."user_id" = 901
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:139:in `block (4 levels) in <top (required)>'
94) UserNotifications user posted .user_mentioned has a message
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 525 AND "topic_users"."user_id" = 902
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:123:in `block (4 levels) in <top (required)>'
95) UserNotifications user posted .user_mentioned has a from alias
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 526 AND "topic_users"."user_id" = 903
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:143:in `block (4 levels) in <top (required)>'
96) UserNotifications user posted .user_mentioned has a context
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 527 AND "topic_users"."user_id" = 904
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:127:in `block (4 levels) in <top (required)>'
97) UserNotifications user posted .user_mentioned has a template
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 528 AND "topic_users"."user_id" = 905
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:119:in `block (4 levels) in <top (required)>'
98) UserNotifications user posted .user_mentioned has a username
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 529 AND "topic_users"."user_id" = 906
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:111:in `block (4 levels) in <top (required)>'
99) UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
Failure/Error: UserNotifications.send(mail_type, user, notification: notification, post: notification.post)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "last_emailed_post_number" of relation "topic_users" does not exist
LINE 1: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE ...
^
: UPDATE "topic_users" SET last_emailed_post_number = 1 WHERE "topic_users"."topic_id" = 530 AND "topic_users"."user_id" = 907
# ./app/models/topic_user.rb:108:in `block in change'
# ./app/models/topic_user.rb:96:in `change'
# ./app/mailers/user_notifications.rb:169:in `notification_email'
# ./app/mailers/user_notifications.rb:82:in `user_posted'
# ./spec/mailers/user_notifications_spec.rb:76:in `expects_build_with'
# ./spec/mailers/user_notifications_spec.rb:82:in `block (4 levels) in <top (required)>'
100) PostAction messaging notify moderators integration test
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 610, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 610 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:19:in `block (3 levels) in <top (required)>'
101) PostAction flag counts should ignore validated flags
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 617, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 617 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:89:in `block (3 levels) in <top (required)>'
102) PostAction flagging should follow the rules for automatic hiding workflow
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 622, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 622 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:234:in `block (3 levels) in <top (required)>'
103) PostAction flagging flag_counts_for returns the correct flag counts
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 623, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 623 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/post_action_spec.rb:183:in `block (4 levels) in <top (required)>'
104) Jobs::PeriodicalUpdates calculates avg post time
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
105) Jobs::PeriodicalUpdates features topics
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
106) Jobs::PeriodicalUpdates calculates avg topic time
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
107) Jobs::PeriodicalUpdates refreshes hot topics
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
108) Jobs::PeriodicalUpdates calculates scores
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
109) Jobs::PeriodicalUpdates updates view counts
Failure/Error: Jobs::PeriodicalUpdates.new.execute(nil)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./app/jobs/scheduled/periodical_updates.rb:28:in `execute'
# ./spec/jobs/periodical_updates_spec.rb:7:in `block (2 levels) in <top (required)>'
110) SpamRulesEnforcer flag_sockpuppets is disabled Then { first_post.reload.spam_count.should == 0 }
Failure/Error: Given!(:first_post) { create_post(user: spammer1) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 627, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 627 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:14:in `block (3 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:17:in `block in Then'
111) SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies Then { first_post.reload.spam_count.should == 1 }
Failure/Error: Given!(:first_post) { create_post(user: spammer1) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 628, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 628 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:25:in `block (4 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:30:in `block in Then'
112) SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies third spam post Then { first_post.reload.spam_count.should == 1 }
Failure/Error: Given!(:first_post) { create_post(user: spammer1) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 629, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 629 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:25:in `block (4 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:36:in `block in Then'
113) SpamRulesEnforcer flag_sockpuppets is enabled first user is not new first user starts a topic a reply by a new user at the same IP address Then { first_post.reload.spam_count.should == 0 }
Failure/Error: Given!(:first_post) { create_post(user: old_user) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 630, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 630 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/same_ip_spammers_spec.rb:47:in `block (5 levels) in <top (required)>'
# ./spec/integration/same_ip_spammers_spec.rb:52:in `block in Then'
114) TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited
Failure/Error: topic_query.list_favorited.topics.should == [topic]
expected: [#<Topic id: 636, title: "This is a test topic 596", last_posted_at: nil, created_at: "2013-12-31 18:28:38", updated_at: "2013-12-31 18:28:38", views: 0, posts_count: 0, user_id: 1155, last_post_user_id: 1155, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:38", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-596", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 636, title: "This is a test topic 596", last_posted_at: nil, created_at: "2013-12-31 18:28:38", updated_at: "2013-12-31 18:28:38", views: 0, posts_count: 0, user_id: 1155, last_post_user_id: 1155, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:38", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-596", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:274:in `block (4 levels) in <top (required)>'
115) TopicQuery list_new with a new topic contains the new topic
Failure/Error: topics.should == [new_topic]
expected: [#<Topic id: 637, title: "This is a test topic 597", last_posted_at: nil, created_at: "2013-12-31 18:28:38", updated_at: "2013-12-31 18:28:38", views: 0, posts_count: 0, user_id: 1158, last_post_user_id: 1158, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:18:38", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-597", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 637, title: "This is a test topic 597", last_posted_at: nil, created_at: "2013-12-31 18:28:38", updated_at: "2013-12-31 18:28:38", views: 0, posts_count: 0, user_id: 1158, last_post_user_id: 1158, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:18:38", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-597", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:294:in `block (4 levels) in <top (required)>'
116) TopicQuery list_new with a new topic muted topics un-muted returns the topic again
Failure/Error: topics.should == [new_topic]
expected: [#<Topic id: 640, title: "This is a test topic 600", last_posted_at: nil, created_at: "2013-12-31 18:28:39", updated_at: "2013-12-31 18:28:39", views: 0, posts_count: 0, user_id: 1164, last_post_user_id: 1164, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:18:39", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-600", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 640, title: "This is a test topic 600", last_posted_at: nil, created_at: "2013-12-31 18:28:39", updated_at: "2013-12-31 18:28:39", views: 0, posts_count: 0, user_id: 1164, last_post_user_id: 1164, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:18:39", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-600", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:320:in `block (6 levels) in <top (required)>'
117) TopicQuery list_posted created topics includes the created topic
Failure/Error: let!(:created_topic) { create_post(user: user).topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 645, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 645 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/topic_query_spec.rb:336:in `block (4 levels) in <top (required)>'
118) TopicQuery list_posted topic you've posted in includes the posted topic
Failure/Error: let(:other_users_topic) { create_post(user: creator).topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 646, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 646 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/topic_query_spec.rb:344:in `block (4 levels) in <top (required)>'
# ./spec/components/topic_query_spec.rb:345:in `block (4 levels) in <top (required)>'
119) TopicQuery suggested_for when anonymous should return the new topic
Failure/Error: TopicQuery.new.list_suggested_for(topic).topics.should == [new_topic]
expected: [#<Topic id: 657, title: "This is a test topic 607", last_posted_at: nil, created_at: "2013-12-31 18:28:41", updated_at: "2013-12-31 18:28:41", views: 0, posts_count: 0, user_id: 1189, last_post_user_id: 1189, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:41", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-607", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 657, title: "This is a test topic 607", last_posted_at: nil, created_at: "2013-12-31 18:28:41", updated_at: "2013-12-31 18:28:41", views: 0, posts_count: 0, user_id: 1189, last_post_user_id: 1189, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:41", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-607", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:361:in `block (4 levels) in <top (required)>'
120) TopicQuery suggested_for when logged in with some existing topics won't return new or fully read if there are enough partially read topics
Failure/Error: suggested_topics.should == [partially_read.id]
expected: [660]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:403:in `block (5 levels) in <top (required)>'
121) TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random
Failure/Error: suggested_topics.should == [partially_read.id, new_topic.id, fully_read.id]
expected: [667, 668, 669]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:413:in `block (5 levels) in <top (required)>'
122) TopicQuery suggested_for when logged in with some existing topics won't fully read if there are enough partially read topics and new topics
Failure/Error: suggested_topics.should == [partially_read.id, new_topic.id]
expected: [674, 675]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:408:in `block (5 levels) in <top (required)>'
123) TopicQuery suggested_for anonymously browswing with invisible, closed and archived should omit the closed/archived/invisbiel topics from suggested
Failure/Error: TopicQuery.new.list_suggested_for(topic).topics.should == [regular_topic]
expected: [#<Topic id: 682, title: "This is a test topic 632", last_posted_at: nil, created_at: "2013-12-31 18:28:42", updated_at: "2013-12-31 18:28:42", views: 0, posts_count: 0, user_id: 1203, last_post_user_id: 1203, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:42", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-632", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 682, title: "This is a test topic 632", last_posted_at: nil, created_at: "2013-12-31 18:28:42", updated_at: "2013-12-31 18:28:42", views: 0, posts_count: 0, user_id: 1203, last_post_user_id: 1203, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:42", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-632", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:373:in `block (4 levels) in <top (required)>'
124) TopicQuery unread / read topics with read data list_read contain both topics
Failure/Error: topic_query.list_read.topics.should =~ [fully_read, partially_read]
expected collection contained: [#<Topic id: 688, title: "This is a test topic 638", last_posted_at: nil, created_at: "2013-12-31 18:28:43", updated_at: "2013-12-31 18:28:43", views: 0, posts_count: 0, user_id: 1207, last_post_user_id: 1207, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:43", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-638", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 689, title: "This is a test topic 639", last_posted_at: nil, created_at: "2013-12-31 18:28:43", updated_at: "2013-12-31 18:28:43", views: 0, posts_count: 0, user_id: 1207, last_post_user_id: 1207, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:43", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-639", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
actual collection contained: []
the missing elements were: [#<Topic id: 688, title: "This is a test topic 638", last_posted_at: nil, created_at: "2013-12-31 18:28:43", updated_at: "2013-12-31 18:28:43", views: 0, posts_count: 0, user_id: 1207, last_post_user_id: 1207, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:43", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-638", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 689, title: "This is a test topic 639", last_posted_at: nil, created_at: "2013-12-31 18:28:43", updated_at: "2013-12-31 18:28:43", views: 0, posts_count: 0, user_id: 1207, last_post_user_id: 1207, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:43", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-639", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
# ./spec/components/topic_query_spec.rb:252:in `block (5 levels) in <top (required)>'
125) TopicQuery unread / read topics with read data user with auto_track_topics list_unread only contains the partially read topic
Failure/Error: topic_query.list_unread.topics.should == [partially_read]
expected: [#<Topic id: 690, title: "This is a test topic 640", last_posted_at: nil, created_at: "2013-12-31 18:28:43", updated_at: "2013-12-31 18:28:43", views: 0, posts_count: 0, user_id: 1209, last_post_user_id: 1209, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:43", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-640", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 690, title: "This is a test topic 640", last_posted_at: nil, created_at: "2013-12-31 18:28:43", updated_at: "2013-12-31 18:28:43", views: 0, posts_count: 0, user_id: 1209, last_post_user_id: 1209, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:28:43", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-640", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:246:in `block (5 levels) in <top (required)>'
126) TopicQuery a bunch of topics list_latest returns the topics in the correct order
Failure/Error: topics.map(&:id).should == [pinned_topic, closed_topic, archived_topic, regular_topic].map(&:id)
expected: [693, 696, 694, 692]
got: [] (using ==)
# ./spec/components/topic_query_spec.rb:129:in `block (4 levels) in <top (required)>'
127) TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top
Failure/Error: topics.should == [closed_topic, archived_topic, pinned_topic, regular_topic]
expected: [#<Topic id: 751, title: "This is a closed topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 2, posts_count: 1, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 1, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: true, archived: false, bumped_at: "2013-12-31 18:27:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-closed-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 2, word_count: nil>, #<Topic id: 749, title: "This is an archived topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 50, posts_count: 4, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 30, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: true, bumped_at: "2013-12-31 18:22:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-an-archived-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>, #<Topic id: 748, title: "This is a pinned topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 10, posts_count: 5, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 100, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:18:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: "2013-12-31 18:18:46", score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-pinned-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 12, word_count: nil>, #<Topic id: 747, title: "This is a regular topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 100, posts_count: 3, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 66, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:13:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-regular-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 11, word_count: nil>]
got: [] (using ==)
Diff:
@@ -1,5 +1,2 @@
-[#<Topic id: 751, title: "This is a closed topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 2, posts_count: 1, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 1, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: true, archived: false, bumped_at: "2013-12-31 18:27:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-closed-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 2, word_count: nil>,
- #<Topic id: 749, title: "This is an archived topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 50, posts_count: 4, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 30, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: true, bumped_at: "2013-12-31 18:22:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-an-archived-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>,
- #<Topic id: 748, title: "This is a pinned topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 10, posts_count: 5, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 100, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:18:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: "2013-12-31 18:18:46", score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-pinned-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 12, word_count: nil>,
- #<Topic id: 747, title: "This is a regular topic", last_posted_at: nil, created_at: "2013-12-31 18:28:46", updated_at: "2013-12-31 18:28:46", views: 100, posts_count: 3, user_id: 1233, last_post_user_id: 1233, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 66, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:13:46", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-regular-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 11, word_count: nil>]
+[]
# ./spec/components/topic_query_spec.rb:188:in `block (4 levels) in <top (required)>'
128) TopicView handles deleted topics
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 838, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 838 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:22:in `block (2 levels) in <top (required)>'
129) TopicView raises an error if the user can't see the topic
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 839, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 839 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:17:in `block (2 levels) in <top (required)>'
130) TopicView with a few sample posts it can find the best responses
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 840, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 840 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
131) TopicView with a few sample posts provides an absolute url
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 841, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 841 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
132) TopicView with a few sample posts raises NotLoggedIn if the user isn't logged in and is trying to view a private message
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 842, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 842 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
133) TopicView with a few sample posts provides a summary of the first post
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 843, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 843 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
134) TopicView with a few sample posts .post_counts_by_user returns the two posters with their counts
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 846, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 846 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
135) TopicView with a few sample posts #next_page should return the next page
Failure/Error: topic = create_topic
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 847, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 847 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:129:in `block (4 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
136) TopicView with a few sample posts .read? tracks correctly
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 848, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 848 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
137) TopicView with a few sample posts .all_post_actions is blank at first
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 849, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 849 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
138) TopicView with a few sample posts .all_post_actions returns the like
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 850, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 850 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
139) TopicView with a few sample posts #recent_posts returns at most 25 recent posts ordered newest first
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 851, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 851 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
140) TopicView with a few sample posts .topic_user returns nil when there is no user
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 852, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 852 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
141) TopicView with a few sample posts .participants returns the two participants hashed by id
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 853, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 853 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:30:in `block (3 levels) in <top (required)>'
142) TopicView.posts contains_gaps? does not contain contains_gaps with default filtering
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 854, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 854 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
143) TopicView.posts contains_gaps? contains contains_gaps when filtered by summary
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 855, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 855 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
144) TopicView.posts contains_gaps? contains contains_gaps when filtered by username
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 856, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 856 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
145) TopicView.posts contains_gaps? contains contains_gaps when filtered by best
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 857, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 857 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
146) TopicView.posts filter_posts_near snaps to the lower boundary
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 858, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 858 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
147) TopicView.posts filter_posts_near returns the posts in the middle
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 859, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 859 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
148) TopicView.posts filter_posts_near snaps to the upper boundary
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 860, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 860 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
149) TopicView.posts filter_posts_near returns deleted posts by nuked users to an admin
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 861, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 861 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
150) TopicView.posts filter_posts_near returns deleted posts to an admin
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 862, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 862 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
151) TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns all the posts
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 863, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 863 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
152) TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns deleted posts to admins
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 864, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 864 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
153) TopicView.posts #filter_posts_paged returns correct posts for all pages
Failure/Error: let(:topic) { create_topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 865, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 865 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/support/helpers.rb:31:in `create_topic'
# ./spec/components/topic_view_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/components/topic_view_spec.rb:216:in `block (3 levels) in <top (required)>'
154) FlagQuery flagged_posts_report operates correctly
Failure/Error: post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 866, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 866 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/components/flag_query_spec.rb:10:in `block (3 levels) in <top (required)>'
155) Category update_stats with regular topics updates topic stats
Failure/Error: create_post(user: @category.user, category: @category.name)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 930, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 930 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/category_spec.rb:286:in `block (4 levels) in <top (required)>'
156) Category update_stats with revised post doesn't count each version of a post
Failure/Error: post = create_post(user: @category.user, category: @category.name)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 932, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 932 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/category_spec.rb:326:in `block (4 levels) in <top (required)>'
157) Category latest should be updated correctly
Failure/Error: post = create_post(category: category.name)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 936, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 936 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/category_spec.rb:257:in `block (3 levels) in <top (required)>'
158) TopicUser unpinned defaults to blank
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 956, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 956 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:27:in `block (3 levels) in <top (required)>'
159) TopicUser visited at set upon initial visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 957, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 957 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:91:in `block (3 levels) in <top (required)>'
160) TopicUser visited at triggers the observer callbacks when updating
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 958, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 958 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:91:in `block (3 levels) in <top (required)>'
161) TopicUser visited at updates upon repeat visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 959, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 959 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:91:in `block (3 levels) in <top (required)>'
162) TopicUser notifications should be set to tracking if auto_track_topics is enabled
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 960, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 960 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:40:in `block (3 levels) in <top (required)>'
163) TopicUser notifications should be set to "regular" notifications, by default on non creators
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 961, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 961 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:52:in `block (3 levels) in <top (required)>'
164) TopicUser notifications should reset regular topics to tracking topics if auto track is changed
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 962, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 962 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:45:in `block (3 levels) in <top (required)>'
165) TopicUser notifications should have the correct reason for a user change when set to regular
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 963, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 963 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:69:in `block (3 levels) in <top (required)>'
166) TopicUser notifications should have the correct reason for a user change when watched
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 964, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 964 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:62:in `block (3 levels) in <top (required)>'
167) TopicUser notifications should watch topics a user created
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 965, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 965 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:16:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:83:in `block (3 levels) in <top (required)>'
168) TopicUser notifications should have the correct reason for a user change when set to regular
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 966, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 966 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:76:in `block (3 levels) in <top (required)>'
169) TopicUser notifications reason should reset when changed
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 967, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 967 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:57:in `block (3 levels) in <top (required)>'
170) TopicUser auto_watch_new_topic auto watches topics when called
Failure/Error: user2 = Fabricate(:user, watch_new_topics: true)
ActiveRecord::UnknownAttributeError:
unknown attribute: watch_new_topics
# ./spec/models/topic_user_spec.rb:263:in `block (3 levels) in <top (required)>'
171) TopicUser change a flag creates a forum topic user record
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 968, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 968 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:187:in `block (3 levels) in <top (required)>'
172) TopicUser change a flag triggers the observer callbacks when updating
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 969, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 969 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:207:in `block (4 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:207:in `times'
# ./spec/models/topic_user_spec.rb:207:in `block (3 levels) in <top (required)>'
173) TopicUser change a flag only inserts a row once, even on repeated calls
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 970, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 970 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:196:in `block (3 levels) in <top (required)>'
174) TopicUser change a flag after creating a row has the correct starred value
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 971, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 971 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:212:in `block (4 levels) in <top (required)>'
175) TopicUser change a flag after creating a row has a key in the lookup for this forum topic
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 972, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 972 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:212:in `block (4 levels) in <top (required)>'
176) TopicUser change a flag after creating a row has a lookup
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 973, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 973 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:212:in `block (4 levels) in <top (required)>'
177) TopicUser read tracking without auto tracking should create a new record for a visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 974, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 974 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:124:in `block (4 levels) in <top (required)>'
178) TopicUser read tracking without auto tracking should update the record for repeat visit
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 975, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 975 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:124:in `block (4 levels) in <top (required)>'
179) TopicUser read tracking auto tracking should automatically track topics you reply to
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 976, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 976 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
180) TopicUser read tracking auto tracking should automatically track topics after they are read for long enough
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 977, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 977 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
181) TopicUser read tracking auto tracking should not automatically track topics you reply to and have set state manually
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 978, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 978 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
182) TopicUser read tracking auto tracking should not automatically track topics after they are read for long enough if changed manually
Failure/Error: TopicCreator.create(u, guardian, title: "this is my topic title")
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 979, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 979 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/topic_creator.rb:6:in `create'
# ./spec/models/topic_user_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/models/topic_user_spec.rb:154:in `block (4 levels) in <top (required)>'
183) SessionController.create when email is confirmed success by username sets a session id
Failure/Error: xhr :post, :create, login: user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x1481acf4>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:37:in `block (5 levels) in <top (required)>'
184) SessionController.create when email is confirmed success by username sets a cookie with the auth token
Failure/Error: xhr :post, :create, login: user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x14621aec>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:37:in `block (5 levels) in <top (required)>'
185) SessionController.create when email is confirmed success by username gives the user an auth token
Failure/Error: xhr :post, :create, login: user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x14441c04>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:37:in `block (5 levels) in <top (required)>'
186) SessionController.create when email is confirmed also allow login by email sets a session id
Failure/Error: xhr :post, :create, login: user.email, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x140d5584>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:67:in `block (5 levels) in <top (required)>'
187) SessionController.create when email is confirmed strips leading @ symbol sets a session id
Failure/Error: xhr :post, :create, login: "@" + user.username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x13eced6c>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:56:in `block (5 levels) in <top (required)>'
188) SessionController.create when email is confirmed login has leading and trailing space strips spaces from the username
Failure/Error: xhr :post, :create, login: username, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x13ce9dd0>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:80:in `block (5 levels) in <top (required)>'
189) SessionController.create when email is confirmed login has leading and trailing space strips spaces from the email
Failure/Error: xhr :post, :create, login: email, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x13af0f74>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:85:in `block (5 levels) in <top (required)>'
190) SessionController.create when email is confirmed when the site requires approval of users with an unapproved user who is an admin sets a session id
Failure/Error: xhr :post, :create, login: user.email, password: 'myawesomepassword'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x136f260c>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:147:in `serialize_data'
# ./app/controllers/application_controller.rb:156:in `render_serialized'
# ./app/controllers/session_controller.rb:93:in `login'
# ./app/controllers/session_controller.rb:40:in `create'
# ./spec/controllers/session_controller_spec.rb:114:in `block (6 levels) in <top (required)>'
191) CategoryFeaturedTopic feature_topics_for should feature topics for a secure category
Failure/Error: let!(:category_post) { PostCreator.create(user, raw: "I put this post in the category", title: "categorize THIS", category: category.id) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 983, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 983 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/models/category_featured_topic_spec.rb:11:in `block (3 levels) in <top (required)>'
192) CategoryFeaturedTopic feature_topics_for should not include invisible topics
Failure/Error: let!(:category_post) { PostCreator.create(user, raw: "I put this post in the category", title: "categorize THIS", category: category.id) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 985, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 985 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/models/category_featured_topic_spec.rb:11:in `block (3 levels) in <top (required)>'
193) UsersController#update with authenticated user with permission to update allows the update
Failure/Error: put :update, username: user.username, name: 'Jim Tom'
NoMethodError:
undefined method `watch_new_topics' for #<User:0x154a7b48>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:238:in `json_result'
# ./app/controllers/users_controller.rb:46:in `update'
# ./spec/controllers/users_controller_spec.rb:964:in `block (5 levels) in <top (required)>'
194) UsersController#update with authenticated user with permission to update returns user JSON
Failure/Error: put :update, username: user.username
NoMethodError:
undefined method `watch_new_topics' for #<User:0x156c1bcc>
# (eval):31:in `_fast_attributes'
# ./app/controllers/application_controller.rb:238:in `json_result'
# ./app/controllers/users_controller.rb:46:in `update'
# ./spec/controllers/users_controller_spec.rb:973:in `block (5 levels) in <top (required)>'
195) UsersController.show returns success
Failure/Error: xhr :get, :show, username: user.username
NoMethodError:
undefined method `watch_new_topics' for #<User:0xf642364>
# (eval):31:in `_fast_attributes'
# ./app/controllers/users_controller.rb:30:in `block (2 levels) in show'
# ./app/controllers/users_controller.rb:28:in `show'
# ./spec/controllers/users_controller_spec.rb:14:in `block (3 levels) in <top (required)>'
196) Topic limits new users to max_topics_in_first_day and max_posts_in_first_day
Failure/Error: topic_id = create_post(user: user).topic_id
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1025, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1025 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_spec.rb:1286:in `block (2 levels) in <top (required)>'
197) Topic last_poster info initially has the last_post_user_id of the OP
Failure/Error: @post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1039, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1039 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_spec.rb:633:in `block (3 levels) in <top (required)>'
198) Topic last_poster info after a second post updates the last_post_user_id to the second_user
Failure/Error: @post = create_post
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1040, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1040 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/models/topic_spec.rb:633:in `block (3 levels) in <top (required)>'
199) Topic revisions changing category removing a category creates a new revision
Failure/Error: topic.revisions.size.should == 3
expected: 3
got: 2 (using ==)
# ./spec/models/topic_spec.rb:774:in `block (5 levels) in <top (required)>'
200) Topic similar_to with a similar topic returns the similar topic if the title is similar
Failure/Error: Topic.similar_to("has evil trout made any topics?", "i am wondering has evil trout made any topics?").should == [topic]
expected: [#<Topic id: 1061, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2013-12-31 18:29:51", updated_at: "2013-12-31 18:29:51", views: 0, posts_count: 0, user_id: 1855, last_post_user_id: 1855, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:29:51", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "evil-trout-is-the-dude-who-posted-this-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: #<ActiveRecord::Relation []> (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1061, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2013-12-31 18:29:51", updated_at: "2013-12-31 18:29:51", views: 0, posts_count: 0, user_id: 1855, last_post_user_id: 1855, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:29:51", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "evil-trout-is-the-dude-who-posted-this-topic", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/models/topic_spec.rb:224:in `block (4 levels) in <top (required)>'
201) Topic for_digest returns regular topics
Failure/Error: Topic.for_digest(user, 1.year.ago).should == [topic]
expected: [#<Topic id: 1094, title: "This is a test topic 904", last_posted_at: nil, created_at: "2013-12-31 18:29:57", updated_at: "2013-12-31 18:29:57", views: 0, posts_count: 0, user_id: 1893, last_post_user_id: 1893, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:29:57", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-904", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
got: #<ActiveRecord::Relation []> (using ==)
Diff:
@@ -1,2 +1,2 @@
-[#<Topic id: 1094, title: "This is a test topic 904", last_posted_at: nil, created_at: "2013-12-31 18:29:57", updated_at: "2013-12-31 18:29:57", views: 0, posts_count: 0, user_id: 1893, last_post_user_id: 1893, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, star_count: 0, category_id: -1, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2013-12-31 18:29:57", has_summary: false, meta_data: nil, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 1.0, notify_user_count: 0, subtype: nil, slug: "this-is-a-test-topic-904", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil>]
+[]
# ./spec/models/topic_spec.rb:1204:in `block (3 levels) in <top (required)>'
202) Topic change_category without a previous category should not change the topic_count when not changed
Failure/Error: lambda { @topic.change_category(@topic.category.name); @category.reload }.should_not change(@category, :topic_count)
NoMethodError:
undefined method `name' for nil:NilClass
# ./spec/models/topic_spec.rb:804:in `block (5 levels) in <top (required)>'
# ./spec/models/topic_spec.rb:804:in `block (4 levels) in <top (required)>'
203) Topic change_category with a previous category when the category exists resets the category
Failure/Error: @topic.category_id.should == SiteSetting.uncategorized_category_id
expected: -1
got: 133 (using ==)
# ./spec/models/topic_spec.rb:883:in `block (5 levels) in <top (required)>'
204) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the first time an import is run it should behave like a successful call to execute should indicate that an import is running
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:207
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:185:in `block (7 levels) in <top (required)>'
205) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should make a backup of the users table
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
206) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should indicate that an import is running
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
207) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should have a users table that's empty
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
208) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should take the site out of maintenance mode when it's done
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
209) Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should put the site in maintenance mode
Failure/Error: Jobs::Importer.new.execute(@importer_args)
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
: ALTER TABLE top_topics SET SCHEMA backup
Shared Example Group: "a successful call to execute" called from ./spec/jobs/importer_spec.rb:214
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/jobs/regular/importer.rb:105:in `backup_and_setup_table'
# ./app/jobs/regular/importer.rb:90:in `block (2 levels) in backup_tables'
# ./app/jobs/regular/importer.rb:89:in `each'
# ./app/jobs/regular/importer.rb:89:in `block in backup_tables'
# ./app/jobs/regular/importer.rb:87:in `backup_tables'
# ./app/jobs/regular/importer.rb:47:in `execute'
# ./spec/jobs/importer_spec.rb:212:in `block (7 levels) in <top (required)>'
210) PostCreator private message acts correctly
Failure/Error: PostCreator.create(user, title: 'hi there welcome to my topic',
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1177, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1177 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:313:in `block (3 levels) in <top (required)>'
# ./spec/components/post_creator_spec.rb:320:in `block (3 levels) in <top (required)>'
211) PostCreator private message to group acts correctly
Failure/Error: PostCreator.create(user, title: 'hi there welcome to my topic',
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1178, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1178 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:349:in `block (3 levels) in <top (required)>'
# ./spec/components/post_creator_spec.rb:356:in `block (3 levels) in <top (required)>'
212) PostCreator disable validations can save a post
Failure/Error: post = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1179, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1179 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:393:in `block (3 levels) in <top (required)>'
213) PostCreator cooking options passes the cooking options through correctly
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1186, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1186 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:303:in `block (3 levels) in <top (required)>'
214) PostCreator word_count has a word count
Failure/Error: post = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1187, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1187 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:401:in `block (3 levels) in <top (required)>'
215) PostCreator new topic can be created with auto tracking disabled
Failure/Error: p = PostCreator.create(user, basic_topic_params.merge(auto_track: false))
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1188, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1188 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:25:in `block (3 levels) in <top (required)>'
216) PostCreator new topic success passes the invalidate_oneboxes along to the job if present
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1189, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1189 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:143:in `block (4 levels) in <top (required)>'
217) PostCreator new topic success passes the image_sizes along to the job if present
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1190, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1190 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:150:in `block (4 levels) in <top (required)>'
218) PostCreator new topic success does not notify on system messages
Failure/Error: p = PostCreator.create(admin, basic_topic_params.merge(post_type: Post.types[:moderator_action]))
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1191, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1191 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:68:in `block (5 levels) in <top (required)>'
# ./spec/support/diagnostics_helper.rb:15:in `track_publish'
# ./spec/components/post_creator_spec.rb:67:in `block (4 levels) in <top (required)>'
219) PostCreator new topic success increases topic response counts
Failure/Error: first_post = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1192, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1192 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:167:in `block (4 levels) in <top (required)>'
220) PostCreator new topic success generates the correct messages for a normal topic
Failure/Error: p = creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1193, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1193 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:112:in `block (5 levels) in <top (required)>'
# ./spec/support/diagnostics_helper.rb:15:in `track_publish'
# ./spec/components/post_creator_spec.rb:111:in `block (4 levels) in <top (required)>'
221) PostCreator new topic success extracts links from the post
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1194, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1194 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:130:in `block (4 levels) in <top (required)>'
222) PostCreator new topic success generates the correct messages for a secure topic
Failure/Error: created_post = PostCreator.new(admin, basic_topic_params.merge(category: cat.id)).create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1196, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1196 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:89:in `block (5 levels) in <top (required)>'
# ./spec/support/diagnostics_helper.rb:15:in `track_publish'
# ./spec/components/post_creator_spec.rb:88:in `block (4 levels) in <top (required)>'
223) PostCreator new topic success doesn't return true for spam
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1197, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1197 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:61:in `block (4 levels) in <top (required)>'
224) PostCreator new topic success assigns a category when supplied
Failure/Error: creator_with_category.create.topic.category.should == category
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1199, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1199 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:154:in `block (4 levels) in <top (required)>'
225) PostCreator new topic success passes the image sizes through
Failure/Error: creator_with_image_sizes.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1200, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1200 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:163:in `block (4 levels) in <top (required)>'
226) PostCreator new topic success adds meta data from the post
Failure/Error: creator_with_meta_data.create.topic.meta_data['hello'].should == 'world'
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1201, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1201 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:158:in `block (4 levels) in <top (required)>'
227) PostCreator new topic success queues up post processing job when saved
Failure/Error: creator.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1202, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1202 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:136:in `block (4 levels) in <top (required)>'
228) PostCreator new topic invalid raw has errors
Failure/Error: creator_invalid_raw.create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1203, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1203 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:52:in `block (4 levels) in <top (required)>'
229) PostCreator new topic when auto-close param is given ensures the user can auto-close the topic, but ignores auto-close param silently
Failure/Error: post = PostCreator.new(user, basic_topic_params.merge(auto_close_time: 2)).create
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1204, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1204 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/components/post_creator_spec.rb:192:in `block (4 levels) in <top (required)>'
230) PostCreator setting created_at acts correctly
Failure/Error: PostCreator.create(user,
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1207, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1207 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/components/post_creator_spec.rb:371:in `block (3 levels) in <top (required)>'
# ./spec/components/post_creator_spec.rb:385:in `block (3 levels) in <top (required)>'
231) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times Then { expect(spam_post.reload).to_not be_hidden }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1208, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1208 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
232) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times spam posts are flagged enough times, but not by enough users Then { expect(spam_post.reload).to_not be_hidden }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1209, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1209 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
233) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times flags_required_to_hide_post takes effect too Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1210, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1210 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
234) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1211, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1211 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
235) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post's flags are cleared Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1212, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1212 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
236) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users spammer becomes a basic user Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1213, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1213 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
237) SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post is deleted Then { expect(spammer.reload).to be_blocked }
Failure/Error: Given!(:spam_post) { create_post(user: spammer) }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1214, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1214 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/support/helpers.rb:39:in `create_post'
# ./spec/integration/spam_rules_spec.rb:23:in `block (5 levels) in <top (required)>'
238) SpamRulesEnforcer auto-blocking users based on flagging spammer has trust level basic one spam post is flagged enough times by enough users Then { expect(spam_post.reload).to_not be_hidden }
Failure/Error: And { expect{PostCreator.create(spammer, {title: 'limited time offer for you', raw: 'better buy this stuff ok', archetype_id: 1})}.to_not raise_error }
expected no Exception, got #<ActiveRecord::StatementInvalid: PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1217, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1217 AND user_id = users.id)
> with backtrace:
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/integration/spam_rules_spec.rb:91:in `block (6 levels) in <top (required)>'
# ./spec/integration/spam_rules_spec.rb:91:in `block (5 levels) in <top (required)>'
# ./spec/integration/spam_rules_spec.rb:89:in `block in Then'
# ./spec/integration/spam_rules_spec.rb:91:in `block (5 levels) in <top (required)>'
# ./spec/integration/spam_rules_spec.rb:89:in `block in Then'
239) TopicStatusUpdate avoids notifying on automatically closed topics
Failure/Error: post = PostCreator.create(user,
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1220, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1220 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./spec/models/topic_status_update_spec.rb:10:in `block (2 levels) in <top (required)>'
240) TopTopic
Failure/Error: it { should belong_to :topic }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 5: WHERE a.attrelid = '"top_topics"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"top_topics"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
# ./spec/models/top_topic_spec.rb:5:in `block (2 levels) in <top (required)>'
241) TopTopic refresh! begins blank
Failure/Error: TopTopic.all.should be_blank
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: SELECT "top_topics".* FROM "top_topics"
^
: SELECT "top_topics".* FROM "top_topics"
# ./spec/models/top_topic_spec.rb:13:in `block (3 levels) in <top (required)>'
242) TopTopic refresh! after calculating should have top topics
Failure/Error: TopTopic.refresh!
ActiveRecord::StatementInvalid:
PG::Error: ERROR: relation "top_topics" does not exist
LINE 1: DELETE FROM top_topics
^
: DELETE FROM top_topics
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/top_topic.rb:16:in `block in refresh!'
# ./app/models/top_topic.rb:14:in `refresh!'
# ./spec/models/top_topic_spec.rb:19:in `block (4 levels) in <top (required)>'
243) User flag_linked_posts_as_spam has flagged all the user's posts as spam
Failure/Error: let!(:post) { PostCreator.new(user, title: "this topic contains spam", raw: "this post has a link: http://discourse.org").create }
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1282, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1282 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./spec/models/user_spec.rb:733:in `block (3 levels) in <top (required)>'
244) CategoryList category order returns topics in specified order
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
245) CategoryList category order default always at the end
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
246) CategoryList category order returns default order categories
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
247) CategoryList category order handles duplicate position values
Failure/Error: uncategorized = Category.find(SiteSetting.uncategorized_category_id)
ActiveRecord::RecordNotFound:
Couldn't find Category with id=-1
# ./spec/components/category_list_spec.rb:79:in `block (3 levels) in <top (required)>'
248) Jobs::Exporter execute when no export or import is running when it finishes successfully and a user was given should send a notification to the user who started the export
Failure/Error: Jobs::Exporter.new.execute( @exporter_args.merge( user_id: @user.id ) )
ActiveRecord::StatementInvalid:
PG::Error: ERROR: column "watch_new_topics" does not exist
LINE 4: WHERE watch_new_topics AND
^
: INSERT INTO topic_users(user_id, topic_id, notification_level, notifications_reason_id)
SELECT id, 1326, 3, 5
FROM users
WHERE watch_new_topics AND
NOT EXISTS(SELECT 1 FROM topic_users WHERE topic_id = 1326 AND user_id = users.id)
# ./lib/freedom_patches/active_record_base.rb:7:in `exec_sql'
# ./app/models/topic_user.rb:77:in `auto_watch_new_topic'
# ./lib/topic_creator.rb:35:in `watch_topic'
# ./lib/topic_creator.rb:24:in `create'
# ./lib/post_creator.rb:182:in `setup_topic'
# ./lib/post_creator.rb:57:in `block in create'
# ./lib/post_creator.rb:56:in `create'
# ./lib/post_creator.rb:91:in `create'
# ./lib/system_message.rb:31:in `create'
# ./app/jobs/regular/exporter.rb:110:in `send_notification'
# ./app/jobs/regular/exporter.rb:88:in `finish_export'
# ./app/jobs/regular/exporter.rb:41:in `execute'
# ./spec/jobs/exporter_spec.rb:157:in `block (7 levels) in <top (required)>'
# ./spec/jobs/exporter_spec.rb:156:in `block (6 levels) in <top (required)>'
Finished in 4 minutes 34.5 seconds
3328 examples, 248 failures
Failed examples:
rspec ./spec/models/topic_tracking_state_spec.rb:13 # TopicTrackingState can correctly publish unread
rspec ./spec/models/topic_tracking_state_spec.rb:18 # TopicTrackingState correctly gets the tracking state
rspec ./spec/components/post_destroyer_spec.rb:15 # PostDestroyer destroy_old_stubs destroys stubs for deleted by user posts
rspec ./spec/components/post_destroyer_spec.rb:58 # PostDestroyer destroy_old_stubs uses the delete_removed_posts_after site setting
rspec ./spec/components/post_destroyer_spec.rb:157 # PostDestroyer deleting the second post in a topic resets the last_poster_id back to the OP
rspec ./spec/components/post_destroyer_spec.rb:161 # PostDestroyer deleting the second post in a topic resets the last_posted_at back to the OP
rspec ./spec/components/post_destroyer_spec.rb:169 # PostDestroyer deleting the second post in a topic topic_user clears the posted flag for the second user
rspec ./spec/components/post_destroyer_spec.rb:177 # PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
rspec ./spec/components/post_destroyer_spec.rb:173 # PostDestroyer deleting the second post in a topic topic_user sets the second user's last_read_post_number back to 1
rspec ./spec/components/post_destroyer_spec.rb:97 # PostDestroyer basic destroying as the creator of the post, doesn't delete the post
rspec ./spec/components/post_destroyer_spec.rb:126 # PostDestroyer basic destroying as a moderator deletes the post
rspec ./spec/components/post_destroyer_spec.rb:137 # PostDestroyer basic destroying as an admin deletes the post
rspec ./spec/components/post_destroyer_spec.rb:259 # PostDestroyer @mentions removes notifications when deleted
rspec ./spec/components/post_destroyer_spec.rb:221 # PostDestroyer after delete should feature the users again (in case they've changed)
rspec ./spec/components/post_destroyer_spec.rb:231 # PostDestroyer after delete with a reply changes the post count of the topic
rspec ./spec/components/post_destroyer_spec.rb:245 # PostDestroyer after delete with a reply should increase the post_number when there are deletion gaps
rspec ./spec/components/post_destroyer_spec.rb:239 # PostDestroyer after delete with a reply lowers the reply_count when the reply is deleted
rspec ./spec/components/post_destroyer_spec.rb:271 # PostDestroyer post actions should reset counts when a post is deleted
rspec ./spec/components/post_destroyer_spec.rb:283 # PostDestroyer post actions should update flag counts on the post
rspec ./spec/components/post_destroyer_spec.rb:276 # PostDestroyer post actions should delete the post actions
rspec ./spec/components/post_destroyer_spec.rb:198 # PostDestroyer deleting a post belonging to a deleted topic as a moderator deletes the post
rspec ./spec/components/post_destroyer_spec.rb:209 # PostDestroyer deleting a post belonging to a deleted topic as an admin deletes the post
rspec ./spec/jobs/feature_topic_users_spec.rb:23 # Jobs::FeatureTopicUsers with a topic won't feature the OP
rspec ./spec/jobs/feature_topic_users_spec.rb:33 # Jobs::FeatureTopicUsers with a topic will not feature the second poster if we supply their post to be ignored
rspec ./spec/jobs/feature_topic_users_spec.rb:28 # Jobs::FeatureTopicUsers with a topic features the second poster
rspec ./spec/jobs/feature_topic_users_spec.rb:38 # Jobs::FeatureTopicUsers with a topic won't feature the last poster
rspec ./spec/jobs/feature_topic_users_spec.rb:51 # Jobs::FeatureTopicUsers participant count it works as expected
rspec ./spec/models/notification_spec.rb:146 # Notification.post returns the post
rspec ./spec/models/notification_spec.rb:26 # Notification post replies notifies the poster on reply
rspec ./spec/models/notification_spec.rb:40 # Notification post watching does notify watching users of new posts
rspec ./spec/models/notification_spec.rb:132 # Notification private message should create a private message notification
rspec ./spec/models/notification_spec.rb:136 # Notification private message should not add a pm notification for the creator
rspec ./spec/controllers/posts_controller_spec.rb:293 # PostsController creating a post when logged in protects against dupes
rspec ./spec/controllers/posts_controller_spec.rb:115 # PostsController recover a post when logged in recovers a post correctly
rspec ./spec/controllers/list_controller_spec.rb:29 # ListController indexes allows users to filter on a set of topic ids
rspec ./spec/components/system_message_spec.rb:16 # SystemMessage send should create a post correctly
rspec ./spec/models/user_action_spec.rb:178 # UserAction when a user posts a new topic when another user posts on the topic should log user actions correctly
rspec ./spec/models/user_action_spec.rb:185 # UserAction when a user posts a new topic when another user posts on the topic should not log a double notification for a post edit
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user replied .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user replied .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user replied .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user replied .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user replied .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user replied .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user replied .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user replied .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user replied .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user replied reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user quoted .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user quoted .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user quoted .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user quoted .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user quoted .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user quoted .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user quoted .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user quoted .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user quoted .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user quoted reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user posted .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user posted .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user posted .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user posted .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user posted .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user posted .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user posted .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user posted .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user posted .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:58 # UserNotifications.user_replied generates a correct email
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user mentioned email .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user mentioned email .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user mentioned email .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user mentioned email .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user mentioned email .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user mentioned email .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user mentioned email .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user mentioned email .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user mentioned email .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user mentioned email reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user invited to a private message .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user invited to a private message .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user invited to a private message .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user invited to a private message .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user invited to a private message .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user invited to a private message .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user invited to a private message .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user invited to a private message .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user invited to a private message .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:89 # UserNotifications user invited to a private message reply_by_email doesn't support reply by email
rspec ./spec/mailers/user_notifications_spec.rb:130 # UserNotifications user posted .user_mentioned has an unsubscribe link
rspec ./spec/mailers/user_notifications_spec.rb:134 # UserNotifications user posted .user_mentioned has an post_id
rspec ./spec/mailers/user_notifications_spec.rb:114 # UserNotifications user posted .user_mentioned has a url
rspec ./spec/mailers/user_notifications_spec.rb:138 # UserNotifications user posted .user_mentioned has an topic_id
rspec ./spec/mailers/user_notifications_spec.rb:122 # UserNotifications user posted .user_mentioned has a message
rspec ./spec/mailers/user_notifications_spec.rb:142 # UserNotifications user posted .user_mentioned has a from alias
rspec ./spec/mailers/user_notifications_spec.rb:126 # UserNotifications user posted .user_mentioned has a context
rspec ./spec/mailers/user_notifications_spec.rb:118 # UserNotifications user posted .user_mentioned has a template
rspec ./spec/mailers/user_notifications_spec.rb:110 # UserNotifications user posted .user_mentioned has a username
rspec ./spec/mailers/user_notifications_spec.rb:81 # UserNotifications user posted reply_by_email should have allow_reply_by_email set when that feature is enabled
rspec ./spec/models/post_action_spec.rb:18 # PostAction messaging notify moderators integration test
rspec ./spec/models/post_action_spec.rb:88 # PostAction flag counts should ignore validated flags
rspec ./spec/models/post_action_spec.rb:233 # PostAction flagging should follow the rules for automatic hiding workflow
rspec ./spec/models/post_action_spec.rb:182 # PostAction flagging flag_counts_for returns the correct flag counts
rspec ./spec/jobs/periodical_updates_spec.rb:10 # Jobs::PeriodicalUpdates calculates avg post time
rspec ./spec/jobs/periodical_updates_spec.rb:18 # Jobs::PeriodicalUpdates features topics
rspec ./spec/jobs/periodical_updates_spec.rb:14 # Jobs::PeriodicalUpdates calculates avg topic time
rspec ./spec/jobs/periodical_updates_spec.rb:32 # Jobs::PeriodicalUpdates refreshes hot topics
rspec ./spec/jobs/periodical_updates_spec.rb:26 # Jobs::PeriodicalUpdates calculates scores
rspec ./spec/jobs/periodical_updates_spec.rb:22 # Jobs::PeriodicalUpdates updates view counts
rspec ./spec/integration/same_ip_spammers_spec.rb:17 # SpamRulesEnforcer flag_sockpuppets is disabled Then { first_post.reload.spam_count.should == 0 }
rspec ./spec/integration/same_ip_spammers_spec.rb:30 # SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies Then { first_post.reload.spam_count.should == 1 }
rspec ./spec/integration/same_ip_spammers_spec.rb:36 # SpamRulesEnforcer flag_sockpuppets is enabled first spammer starts a topic second spammer replies third spam post Then { first_post.reload.spam_count.should == 1 }
rspec ./spec/integration/same_ip_spammers_spec.rb:52 # SpamRulesEnforcer flag_sockpuppets is enabled first user is not new first user starts a topic a reply by a new user at the same IP address Then { first_post.reload.spam_count.should == 0 }
rspec ./spec/components/topic_query_spec.rb:273 # TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited
rspec ./spec/components/topic_query_spec.rb:293 # TopicQuery list_new with a new topic contains the new topic
rspec ./spec/components/topic_query_spec.rb:319 # TopicQuery list_new with a new topic muted topics un-muted returns the topic again
rspec ./spec/components/topic_query_spec.rb:338 # TopicQuery list_posted created topics includes the created topic
rspec ./spec/components/topic_query_spec.rb:347 # TopicQuery list_posted topic you've posted in includes the posted topic
rspec ./spec/components/topic_query_spec.rb:360 # TopicQuery suggested_for when anonymous should return the new topic
rspec ./spec/components/topic_query_spec.rb:401 # TopicQuery suggested_for when logged in with some existing topics won't return new or fully read if there are enough partially read topics
rspec ./spec/components/topic_query_spec.rb:411 # TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random
rspec ./spec/components/topic_query_spec.rb:406 # TopicQuery suggested_for when logged in with some existing topics won't fully read if there are enough partially read topics and new topics
rspec ./spec/components/topic_query_spec.rb:372 # TopicQuery suggested_for anonymously browswing with invisible, closed and archived should omit the closed/archived/invisbiel topics from suggested
rspec ./spec/components/topic_query_spec.rb:251 # TopicQuery unread / read topics with read data list_read contain both topics
rspec ./spec/components/topic_query_spec.rb:245 # TopicQuery unread / read topics with read data user with auto_track_topics list_unread only contains the partially read topic
rspec ./spec/components/topic_query_spec.rb:128 # TopicQuery a bunch of topics list_latest returns the topics in the correct order
rspec ./spec/components/topic_query_spec.rb:187 # TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top
rspec ./spec/components/topic_view_spec.rb:21 # TopicView handles deleted topics
rspec ./spec/components/topic_view_spec.rb:16 # TopicView raises an error if the user can't see the topic
rspec ./spec/components/topic_view_spec.rb:37 # TopicView with a few sample posts it can find the best responses
rspec ./spec/components/topic_view_spec.rb:97 # TopicView with a few sample posts provides an absolute url
rspec ./spec/components/topic_view_spec.rb:92 # TopicView with a few sample posts raises NotLoggedIn if the user isn't logged in and is trying to view a private message
rspec ./spec/components/topic_view_spec.rb:101 # TopicView with a few sample posts provides a summary of the first post
rspec ./spec/components/topic_view_spec.rb:148 # TopicView with a few sample posts .post_counts_by_user returns the two posters with their counts
rspec ./spec/components/topic_view_spec.rb:142 # TopicView with a few sample posts #next_page should return the next page
rspec ./spec/components/topic_view_spec.rb:171 # TopicView with a few sample posts .read? tracks correctly
rspec ./spec/components/topic_view_spec.rb:160 # TopicView with a few sample posts .all_post_actions is blank at first
rspec ./spec/components/topic_view_spec.rb:164 # TopicView with a few sample posts .all_post_actions returns the like
rspec ./spec/components/topic_view_spec.rb:198 # TopicView with a few sample posts #recent_posts returns at most 25 recent posts ordered newest first
rspec ./spec/components/topic_view_spec.rb:186 # TopicView with a few sample posts .topic_user returns nil when there is no user
rspec ./spec/components/topic_view_spec.rb:154 # TopicView with a few sample posts .participants returns the two participants hashed by id
rspec ./spec/components/topic_view_spec.rb:236 # TopicView.posts contains_gaps? does not contain contains_gaps with default filtering
rspec ./spec/components/topic_view_spec.rb:244 # TopicView.posts contains_gaps? contains contains_gaps when filtered by summary
rspec ./spec/components/topic_view_spec.rb:240 # TopicView.posts contains_gaps? contains contains_gaps when filtered by username
rspec ./spec/components/topic_view_spec.rb:248 # TopicView.posts contains_gaps? contains contains_gaps when filtered by best
rspec ./spec/components/topic_view_spec.rb:272 # TopicView.posts filter_posts_near snaps to the lower boundary
rspec ./spec/components/topic_view_spec.rb:284 # TopicView.posts filter_posts_near returns the posts in the middle
rspec ./spec/components/topic_view_spec.rb:278 # TopicView.posts filter_posts_near snaps to the upper boundary
rspec ./spec/components/topic_view_spec.rb:297 # TopicView.posts filter_posts_near returns deleted posts by nuked users to an admin
rspec ./spec/components/topic_view_spec.rb:290 # TopicView.posts filter_posts_near returns deleted posts to an admin
rspec ./spec/components/topic_view_spec.rb:307 # TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns all the posts
rspec ./spec/components/topic_view_spec.rb:312 # TopicView.posts filter_posts_near when 'posts per page' exceeds the number of posts returns deleted posts to admins
rspec ./spec/components/topic_view_spec.rb:258 # TopicView.posts #filter_posts_paged returns correct posts for all pages
rspec ./spec/components/flag_query_spec.rb:9 # FlagQuery flagged_posts_report operates correctly
rspec ./spec/models/category_spec.rb:291 # Category update_stats with regular topics updates topic stats
rspec ./spec/models/category_spec.rb:335 # Category update_stats with revised post doesn't count each version of a post
rspec ./spec/models/category_spec.rb:255 # Category latest should be updated correctly
rspec ./spec/models/topic_user_spec.rb:30 # TopicUser unpinned defaults to blank
rspec ./spec/models/topic_user_spec.rb:94 # TopicUser visited at set upon initial visit
rspec ./spec/models/topic_user_spec.rb:113 # TopicUser visited at triggers the observer callbacks when updating
rspec ./spec/models/topic_user_spec.rb:101 # TopicUser visited at updates upon repeat visit
rspec ./spec/models/topic_user_spec.rb:38 # TopicUser notifications should be set to tracking if auto_track_topics is enabled
rspec ./spec/models/topic_user_spec.rb:51 # TopicUser notifications should be set to "regular" notifications, by default on non creators
rspec ./spec/models/topic_user_spec.rb:44 # TopicUser notifications should reset regular topics to tracking topics if auto track is changed
rspec ./spec/models/topic_user_spec.rb:68 # TopicUser notifications should have the correct reason for a user change when set to regular
rspec ./spec/models/topic_user_spec.rb:61 # TopicUser notifications should have the correct reason for a user change when watched
rspec ./spec/models/topic_user_spec.rb:82 # TopicUser notifications should watch topics a user created
rspec ./spec/models/topic_user_spec.rb:75 # TopicUser notifications should have the correct reason for a user change when set to regular
rspec ./spec/models/topic_user_spec.rb:56 # TopicUser notifications reason should reset when changed
rspec ./spec/models/topic_user_spec.rb:261 # TopicUser auto_watch_new_topic auto watches topics when called
rspec ./spec/models/topic_user_spec.rb:186 # TopicUser change a flag creates a forum topic user record
rspec ./spec/models/topic_user_spec.rb:205 # TopicUser change a flag triggers the observer callbacks when updating
rspec ./spec/models/topic_user_spec.rb:194 # TopicUser change a flag only inserts a row once, even on repeated calls
rspec ./spec/models/topic_user_spec.rb:215 # TopicUser change a flag after creating a row has the correct starred value
rspec ./spec/models/topic_user_spec.rb:223 # TopicUser change a flag after creating a row has a key in the lookup for this forum topic
rspec ./spec/models/topic_user_spec.rb:219 # TopicUser change a flag after creating a row has a lookup
rspec ./spec/models/topic_user_spec.rb:129 # TopicUser read tracking without auto tracking should create a new record for a visit
rspec ./spec/models/topic_user_spec.rb:137 # TopicUser read tracking without auto tracking should update the record for repeat visit
rspec ./spec/models/topic_user_spec.rb:157 # TopicUser read tracking auto tracking should automatically track topics you reply to
rspec ./spec/models/topic_user_spec.rb:170 # TopicUser read tracking auto tracking should automatically track topics after they are read for long enough
rspec ./spec/models/topic_user_spec.rb:163 # TopicUser read tracking auto tracking should not automatically track topics you reply to and have set state manually
rspec ./spec/models/topic_user_spec.rb:176 # TopicUser read tracking auto tracking should not automatically track topics after they are read for long enough if changed manually
rspec ./spec/controllers/session_controller_spec.rb:41 # SessionController.create when email is confirmed success by username sets a session id
rspec ./spec/controllers/session_controller_spec.rb:49 # SessionController.create when email is confirmed success by username sets a cookie with the auth token
rspec ./spec/controllers/session_controller_spec.rb:45 # SessionController.create when email is confirmed success by username gives the user an auth token
rspec ./spec/controllers/session_controller_spec.rb:70 # SessionController.create when email is confirmed also allow login by email sets a session id
rspec ./spec/controllers/session_controller_spec.rb:60 # SessionController.create when email is confirmed strips leading @ symbol sets a session id
rspec ./spec/controllers/session_controller_spec.rb:79 # SessionController.create when email is confirmed login has leading and trailing space strips spaces from the username
rspec ./spec/controllers/session_controller_spec.rb:84 # SessionController.create when email is confirmed login has leading and trailing space strips spaces from the email
rspec ./spec/controllers/session_controller_spec.rb:117 # SessionController.create when email is confirmed when the site requires approval of users with an unapproved user who is an admin sets a session id
rspec ./spec/models/category_featured_topic_spec.rb:13 # CategoryFeaturedTopic feature_topics_for should feature topics for a secure category
rspec ./spec/models/category_featured_topic_spec.rb:28 # CategoryFeaturedTopic feature_topics_for should not include invisible topics
rspec ./spec/controllers/users_controller_spec.rb:960 # UsersController#update with authenticated user with permission to update allows the update
rspec ./spec/controllers/users_controller_spec.rb:970 # UsersController#update with authenticated user with permission to update returns user JSON
rspec ./spec/controllers/users_controller_spec.rb:13 # UsersController.show returns success
rspec ./spec/models/topic_spec.rb:1275 # Topic limits new users to max_topics_in_first_day and max_posts_in_first_day
rspec ./spec/models/topic_spec.rb:638 # Topic last_poster info initially has the last_post_user_id of the OP
rspec ./spec/models/topic_spec.rb:649 # Topic last_poster info after a second post updates the last_post_user_id to the second_user
rspec ./spec/models/topic_spec.rb:773 # Topic revisions changing category removing a category creates a new revision
rspec ./spec/models/topic_spec.rb:223 # Topic similar_to with a similar topic returns the similar topic if the title is similar
rspec ./spec/models/topic_spec.rb:1202 # Topic for_digest returns regular topics
rspec ./spec/models/topic_spec.rb:803 # Topic change_category without a previous category should not change the topic_count when not changed
rspec ./spec/models/topic_spec.rb:882 # Topic change_category with a previous category when the category exists resets the category
rspec ./spec/jobs/importer_spec.rb:181 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the first time an import is run it should behave like a successful call to execute should indicate that an import is running
rspec ./spec/jobs/importer_spec.rb:167 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should make a backup of the users table
rspec ./spec/jobs/importer_spec.rb:181 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should indicate that an import is running
rspec ./spec/jobs/importer_spec.rb:174 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should have a users table that's empty
rspec ./spec/jobs/importer_spec.rb:197 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should take the site out of maintenance mode when it's done
rspec ./spec/jobs/importer_spec.rb:188 # Jobs::Importer when import is enabled execute when no export or import are running before loading data into tables the second time an import is run it should behave like a successful call to execute should put the site in maintenance mode
rspec ./spec/components/post_creator_spec.rb:319 # PostCreator private message acts correctly
rspec ./spec/components/post_creator_spec.rb:355 # PostCreator private message to group acts correctly
rspec ./spec/components/post_creator_spec.rb:391 # PostCreator disable validations can save a post
rspec ./spec/components/post_creator_spec.rb:296 # PostCreator cooking options passes the cooking options through correctly
rspec ./spec/components/post_creator_spec.rb:399 # PostCreator word_count has a word count
rspec ./spec/components/post_creator_spec.rb:24 # PostCreator new topic can be created with auto tracking disabled
rspec ./spec/components/post_creator_spec.rb:139 # PostCreator new topic success passes the invalidate_oneboxes along to the job if present
rspec ./spec/components/post_creator_spec.rb:146 # PostCreator new topic success passes the image_sizes along to the job if present
rspec ./spec/components/post_creator_spec.rb:65 # PostCreator new topic success does not notify on system messages
rspec ./spec/components/post_creator_spec.rb:166 # PostCreator new topic success increases topic response counts
rspec ./spec/components/post_creator_spec.rb:108 # PostCreator new topic success generates the correct messages for a normal topic
rspec ./spec/components/post_creator_spec.rb:128 # PostCreator new topic success extracts links from the post
rspec ./spec/components/post_creator_spec.rb:77 # PostCreator new topic success generates the correct messages for a secure topic
rspec ./spec/components/post_creator_spec.rb:60 # PostCreator new topic success doesn't return true for spam
rspec ./spec/components/post_creator_spec.rb:153 # PostCreator new topic success assigns a category when supplied
rspec ./spec/components/post_creator_spec.rb:161 # PostCreator new topic success passes the image sizes through
rspec ./spec/components/post_creator_spec.rb:157 # PostCreator new topic success adds meta data from the post
rspec ./spec/components/post_creator_spec.rb:133 # PostCreator new topic success queues up post processing job when saved
rspec ./spec/components/post_creator_spec.rb:51 # PostCreator new topic invalid raw has errors
rspec ./spec/components/post_creator_spec.rb:190 # PostCreator new topic when auto-close param is given ensures the user can auto-close the topic, but ignores auto-close param silently
rspec ./spec/components/post_creator_spec.rb:384 # PostCreator setting created_at acts correctly
rspec ./spec/integration/spam_rules_spec.rb:26 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times Then { expect(spam_post.reload).to_not be_hidden }
rspec ./spec/integration/spam_rules_spec.rb:30 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times spam posts are flagged enough times, but not by enough users Then { expect(spam_post.reload).to_not be_hidden }
rspec ./spec/integration/spam_rules_spec.rb:75 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times flags_required_to_hide_post takes effect too Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:46 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:58 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post's flags are cleared Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:68 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users spammer becomes a basic user Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:63 # SpamRulesEnforcer auto-blocking users based on flagging spammer is a new user spammer post is not flagged enough times one spam post is flagged enough times by enough users a post is deleted Then { expect(spammer.reload).to be_blocked }
rspec ./spec/integration/spam_rules_spec.rb:89 # SpamRulesEnforcer auto-blocking users based on flagging spammer has trust level basic one spam post is flagged enough times by enough users Then { expect(spam_post.reload).to_not be_hidden }
rspec ./spec/models/topic_status_update_spec.rb:7 # TopicStatusUpdate avoids notifying on automatically closed topics
rspec ./spec/models/top_topic_spec.rb:5 # TopTopic
rspec ./spec/models/top_topic_spec.rb:12 # TopTopic refresh! begins blank
rspec ./spec/models/top_topic_spec.rb:22 # TopTopic refresh! after calculating should have top topics
rspec ./spec/models/user_spec.rb:737 # User flag_linked_posts_as_spam has flagged all the user's posts as spam
rspec ./spec/components/category_list_spec.rb:84 # CategoryList category order returns topics in specified order
rspec ./spec/components/category_list_spec.rb:95 # CategoryList category order default always at the end
rspec ./spec/components/category_list_spec.rb:89 # CategoryList category order returns default order categories
rspec ./spec/components/category_list_spec.rb:100 # CategoryList category order handles duplicate position values
rspec ./spec/jobs/exporter_spec.rb:153 # Jobs::Exporter execute when no export or import is running when it finishes successfully and a user was given should send a notification to the user who started the export
Randomized with seed 21534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment