Skip to content

Commit

Permalink
update assertions for all notes to match new fixtures #8864
Browse files Browse the repository at this point in the history
  • Loading branch information
noi5e committed Feb 24, 2021
1 parent c388dcf commit a291fe0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/functional/notes_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def teardown
get :index
assert_response :success
selector = css_select 'div.note'
assert_equal 17, selector.size
assert_equal 20, selector.size
end

test 'first-timer moderated note (status=4) shown to moderator with notice and approval prompt in full view' do
Expand Down Expand Up @@ -398,7 +398,7 @@ def teardown

assert_response :success
selector = css_select 'div.note'
assert_equal 17, selector.size
assert_equal 20, selector.size
end

test 'post_note_error_no_title' do
Expand Down
37 changes: 36 additions & 1 deletion test/unit/node_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,42 @@ def setup

test 'should find all research notes' do
notes = Node.research_notes
expected = [nodes(:one), nodes(:spam), nodes(:first_timer_note), nodes(:blog), nodes(:moderated_user_note), nodes(:activity), nodes(:upgrade), nodes(:draft), nodes(:post_test1), nodes(:post_test2), nodes(:post_test3), nodes(:post_test4), nodes(:scraped_image), nodes(:search_trawling), nodes(:purple_air_without_hyphen), nodes(:purple_air_with_hyphen), nodes(:sun_note), nodes(:sunny_day_note), nodes(:comment_note), nodes(:hidden_response_note), nodes(:note_with_multiple_comments)]
expected = [
nodes(:one),
nodes(:spam),
nodes(:first_timer_note),
nodes(:blog),
nodes(:moderated_user_note),
nodes(:activity),
nodes(:upgrade),
nodes(:draft),
nodes(:post_test1),
nodes(:post_test2),
nodes(:post_test3),
nodes(:post_test4),
nodes(:scraped_image),
nodes(:search_trawling),
nodes(:purple_air_without_hyphen),
nodes(:purple_air_with_hyphen),
nodes(:sun_note),
nodes(:sunny_day_note),
nodes(:comment_note),
nodes(:hidden_response_note),
nodes(:note_with_multiple_comments),
nodes(:checkbox_one),
nodes(:checkbox_two),
nodes(:hashtag_one),
nodes(:hashtag_two),
nodes(:hashtag_three),
nodes(:hashtag_four),
nodes(:hashtag_with_hyphens),
nodes(:hashtag_with_punctuation),
nodes(:hashtag_in_header),
nodes(:subheader),
nodes(:hashtag_in_link),
nodes(:hashtag_in_url),
nodes(:email),
]
assert_equal expected, notes
end

Expand Down

0 comments on commit a291fe0

Please sign in to comment.