Created
October 24, 2013 10:07
-
-
Save ZogStriP/7134507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) 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)>' | |
2) Site omits categories users can not write to from the category list | |
Failure/Error: Site.new(Guardian.new(user)).categories.count.should == 2 | |
expected: 2 | |
got: 1 (using ==) | |
# ./spec/models/site_spec.rb:9:in `block (2 levels) in <top (required)>' | |
3) CategoryList security properly hide secure categories | |
Failure/Error: CategoryList.new(Guardian.new admin).categories.count.should == 2 | |
expected: 2 | |
got: 1 (using ==) | |
# ./spec/components/category_list_spec.rb:20:in `block (3 levels) in <top (required)>' | |
4) CategoryList with a category without a featured topic returns the empty category and a non-empty category for those who can create them | |
Failure/Error: category_list.categories.should have(3).categories | |
expected 3 categories, got 2 | |
# ./spec/components/category_list_spec.rb:51:in `block (4 levels) in <top (required)>' | |
5) Topic versions changing category removing a category creates a new version | |
Failure/Error: topic.version.should == 3 | |
expected: 3 | |
got: 2 (using ==) | |
# ./spec/models/topic_spec.rb:767: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:797:in `block (5 levels) in <top (required)>' | |
# ./spec/models/topic_spec.rb:797: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: 95 (using ==) | |
# ./spec/models/topic_spec.rb:876:in `block (5 levels) in <top (required)>' | |
8) 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: 1106, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2013-10-24 10:04:31", updated_at: "2013-10-24 10:04:31", views: 0, posts_count: 0, user_id: 2230, last_post_user_id: 2230, 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-10-24 10:04:31", has_best_of: false, meta_data: {}, 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>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1106, title: "Evil trout is the dude who posted this topic", last_posted_at: nil, created_at: "2013-10-24 10:04:31", updated_at: "2013-10-24 10:04:31", views: 0, posts_count: 0, user_id: 2230, last_post_user_id: 2230, 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-10-24 10:04:31", has_best_of: false, meta_data: {}, 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>] | |
+[] | |
# ./spec/models/topic_spec.rb:219:in `block (4 levels) in <top (required)>' | |
9) Category topic_create_allowed and post_create_allowed works | |
Failure/Error: Category.topic_create_allowed(guardian).count.should == 5 | |
expected: 5 | |
got: 4 (using ==) | |
# ./spec/models/category_spec.rb:60:in `block (3 levels) in <top (required)>' | |
10) Category security lists all secured categories correctly | |
Failure/Error: Category.secured.should =~ [uncategorized] | |
expected collection contained: [nil] | |
actual collection contained: [] | |
the missing elements were: [nil] | |
# ./spec/models/category_spec.rb:119:in `block (3 levels) in <top (required)>' | |
11) 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: 1209, title: "This is a test topic 1066", last_posted_at: nil, created_at: "2013-10-24 10:04:42", updated_at: "2013-10-24 10:04:42", views: 0, posts_count: 0, user_id: 2437, last_post_user_id: 2437, 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-10-24 10:04:42", has_best_of: false, meta_data: {}, 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-1066", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>, #<Topic id: 1210, title: "This is a test topic 1067", last_posted_at: nil, created_at: "2013-10-24 10:04:42", updated_at: "2013-10-24 10:04:42", views: 0, posts_count: 0, user_id: 2437, last_post_user_id: 2437, 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-10-24 10:04:42", has_best_of: false, meta_data: {}, 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-1067", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
actual collection contained: [] | |
the missing elements were: [#<Topic id: 1209, title: "This is a test topic 1066", last_posted_at: nil, created_at: "2013-10-24 10:04:42", updated_at: "2013-10-24 10:04:42", views: 0, posts_count: 0, user_id: 2437, last_post_user_id: 2437, 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-10-24 10:04:42", has_best_of: false, meta_data: {}, 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-1066", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>, #<Topic id: 1210, title: "This is a test topic 1067", last_posted_at: nil, created_at: "2013-10-24 10:04:42", updated_at: "2013-10-24 10:04:42", views: 0, posts_count: 0, user_id: 2437, last_post_user_id: 2437, 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-10-24 10:04:42", has_best_of: false, meta_data: {}, 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-1067", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
# ./spec/components/topic_query_spec.rb:141:in `block (5 levels) in <top (required)>' | |
12) 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: 1211, title: "This is a test topic 1068", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2439, last_post_user_id: 2439, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1068", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1211, title: "This is a test topic 1068", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2439, last_post_user_id: 2439, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1068", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:131:in `block (5 levels) in <top (required)>' | |
13) TopicQuery unread / read topics with read data user with auto_track_topics list_unread returns 1 as the unread count | |
Failure/Error: topic_query.unread_count.should == 1 | |
expected: 1 | |
got: 0 (using ==) | |
# ./spec/components/topic_query_spec.rb:135:in `block (5 levels) in <top (required)>' | |
14) 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:232:in `block (4 levels) in <top (required)>' | |
15) 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:241:in `block (4 levels) in <top (required)>' | |
16) 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: 1217, title: "This is a test topic 1072", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2448, last_post_user_id: 2448, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1072", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1217, title: "This is a test topic 1072", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2448, last_post_user_id: 2448, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1072", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:163:in `block (4 levels) in <top (required)>' | |
17) 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: 1218, title: "This is a test topic 1073", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2450, last_post_user_id: 2450, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1073", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1218, title: "This is a test topic 1073", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2450, last_post_user_id: 2450, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1073", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:254:in `block (4 levels) in <top (required)>' | |
18) 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: [1221] | |
got: [] (using ==) | |
# ./spec/components/topic_query_spec.rb:296:in `block (5 levels) in <top (required)>' | |
19) 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: [1228, 1229, 1230] | |
got: [] (using ==) | |
# ./spec/components/topic_query_spec.rb:306:in `block (5 levels) in <top (required)>' | |
20) 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: [1235, 1236] | |
got: [] (using ==) | |
# ./spec/components/topic_query_spec.rb:301:in `block (5 levels) in <top (required)>' | |
21) 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: 1243, title: "This is a test topic 1098", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2464, last_post_user_id: 2464, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1098", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1243, title: "This is a test topic 1098", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2464, last_post_user_id: 2464, 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-10-24 10:04:43", has_best_of: false, meta_data: {}, 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-1098", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:266:in `block (4 levels) in <top (required)>' | |
22) TopicQuery list_new with a new topic contains the new topic | |
Failure/Error: topics.should == [new_topic] | |
expected: [#<Topic id: 1247, title: "This is a test topic 1102", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2467, last_post_user_id: 2467, 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-10-24 09:54:43", has_best_of: false, meta_data: {}, 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-1102", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1247, title: "This is a test topic 1102", last_posted_at: nil, created_at: "2013-10-24 10:04:43", updated_at: "2013-10-24 10:04:43", views: 0, posts_count: 0, user_id: 2467, last_post_user_id: 2467, 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-10-24 09:54:43", has_best_of: false, meta_data: {}, 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-1102", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:187:in `block (4 levels) in <top (required)>' | |
23) TopicQuery list_new with a new topic muted topics un-muted returns the topic again | |
Failure/Error: topics.should == [new_topic] | |
expected: [#<Topic id: 1250, title: "This is a test topic 1105", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2473, last_post_user_id: 2473, 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-10-24 09:54:44", has_best_of: false, meta_data: {}, 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-1105", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Topic id: 1250, title: "This is a test topic 1105", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2473, last_post_user_id: 2473, 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-10-24 09:54:44", has_best_of: false, meta_data: {}, 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-1105", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:213:in `block (6 levels) in <top (required)>' | |
24) TopicQuery a bunch of topics list_latest returns the topics in the correct order | |
Failure/Error: topics.map(&:title).should == [pinned_topic, closed_topic, archived_topic, regular_topic].map(&:title) | |
expected: ["This is a pinned topic", "This is a closed topic", "This is an archived topic", "This is a regular topic"] | |
got: [] (using ==) | |
# ./spec/components/topic_query_spec.rb:52:in `block (4 levels) in <top (required)>' | |
25) 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: 1270, title: "This is a closed topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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: true, archived: false, bumped_at: "2013-10-24 10:03:44", has_best_of: false, meta_data: {}, 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>, #<Topic id: 1268, title: "This is an archived topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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: true, bumped_at: "2013-10-24 09:58:44", has_best_of: false, meta_data: {}, 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>, #<Topic id: 1267, title: "This is a pinned topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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-10-24 09:54:44", has_best_of: false, meta_data: {}, 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-10-24 09:54:44", 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>, #<Topic id: 1266, title: "This is a regular topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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-10-24 09:49:44", has_best_of: false, meta_data: {}, 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>] | |
got: [] (using ==) | |
Diff: | |
@@ -1,5 +1,2 @@ | |
-[#<Topic id: 1270, title: "This is a closed topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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: true, archived: false, bumped_at: "2013-10-24 10:03:44", has_best_of: false, meta_data: {}, 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>, | |
- #<Topic id: 1268, title: "This is an archived topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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: true, bumped_at: "2013-10-24 09:58:44", has_best_of: false, meta_data: {}, 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>, | |
- #<Topic id: 1267, title: "This is a pinned topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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-10-24 09:54:44", has_best_of: false, meta_data: {}, 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-10-24 09:54:44", 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>, | |
- #<Topic id: 1266, title: "This is a regular topic", last_posted_at: nil, created_at: "2013-10-24 10:04:44", updated_at: "2013-10-24 10:04:44", views: 0, posts_count: 0, user_id: 2481, last_post_user_id: 2481, 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-10-24 09:49:44", has_best_of: false, meta_data: {}, 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>] | |
+[] | |
# ./spec/components/topic_query_spec.rb:70:in `block (4 levels) in <top (required)>' | |
26) 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 1 minute 34.24 seconds | |
3077 examples, 26 failures | |
Failed examples: | |
rspec ./spec/controllers/list_controller_spec.rb:29 # ListController indexes allows users to filter on a set of topic ids | |
rspec ./spec/models/site_spec.rb:5 # Site omits categories users can not write to from the category list | |
rspec ./spec/components/category_list_spec.rb:10 # CategoryList security properly hide secure categories | |
rspec ./spec/components/category_list_spec.rb:48 # CategoryList with a category without a featured topic returns the empty category and a non-empty category for those who can create them | |
rspec ./spec/models/topic_spec.rb:766 # Topic versions changing category removing a category creates a new version | |
rspec ./spec/models/topic_spec.rb:796 # Topic change_category without a previous category should not change the topic_count when not changed | |
rspec ./spec/models/topic_spec.rb:875 # Topic change_category with a previous category when the category exists resets the category | |
rspec ./spec/models/topic_spec.rb:218 # Topic similar_to with a similar topic returns the similar topic if the title is similar | |
rspec ./spec/models/category_spec.rb:33 # Category topic_create_allowed and post_create_allowed works | |
rspec ./spec/models/category_spec.rb:110 # Category security lists all secured categories correctly | |
rspec ./spec/components/topic_query_spec.rb:140 # TopicQuery unread / read topics with read data list_read contain both topics | |
rspec ./spec/components/topic_query_spec.rb:130 # 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:134 # TopicQuery unread / read topics with read data user with auto_track_topics list_unread returns 1 as the unread count | |
rspec ./spec/components/topic_query_spec.rb:231 # TopicQuery list_posted created topics includes the created topic | |
rspec ./spec/components/topic_query_spec.rb:240 # TopicQuery list_posted topic you've posted in includes the posted topic | |
rspec ./spec/components/topic_query_spec.rb:162 # TopicQuery list_favorited with a favorited topic returns the topic after it has been favorited | |
rspec ./spec/components/topic_query_spec.rb:253 # TopicQuery suggested_for when anonymous should return the new topic | |
rspec ./spec/components/topic_query_spec.rb:294 # 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:304 # TopicQuery suggested_for when logged in with some existing topics returns unread, then new, then random | |
rspec ./spec/components/topic_query_spec.rb:299 # 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:265 # 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:186 # TopicQuery list_new with a new topic contains the new topic | |
rspec ./spec/components/topic_query_spec.rb:212 # TopicQuery list_new with a new topic muted topics un-muted returns the topic again | |
rspec ./spec/components/topic_query_spec.rb:51 # TopicQuery a bunch of topics list_latest returns the topics in the correct order | |
rspec ./spec/components/topic_query_spec.rb:69 # TopicQuery a bunch of topics after clearring a pinned topic no longer shows the pinned topic at the top | |
rspec ./spec/models/topic_tracking_state_spec.rb:18 # TopicTrackingState correctly gets the tracking state | |
Randomized with seed 15602 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment