[Git][noosfero/noosfero][master] community_track plugin: fix failing test
Antonio Terceiro
gitlab at mg.gitlab.com
Thu Jan 21 17:37:02 BRST 2016
Antonio Terceiro pushed to branch master at Noosfero / noosfero
Commits:
2ebc7cc4 by Antonio Terceiro at 2016-01-21T17:35:50-02:00
community_track plugin: fix failing test
Due to how will_paginate 3.0 works, we need to actually load the
paginated collection data by querying it as an array before calling
size() with not arguments directly on it.
- - - - -
1 changed file:
- plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
Changes:
=====================================
plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
=====================================
--- a/plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
+++ b/plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
@@ -31,7 +31,7 @@ class TrackListBlockTest < ActiveSupport::TestCase
should 'list of articles be limited by block configuration' do
(@block.limit + 1).times { |i| create_track("track#{i}", profile) }
- assert_equal @block.limit, @block.tracks.size
+ assert_equal @block.limit, @block.tracks.to_a.size
end
should 'return more link if has more tracks to show' do
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/2ebc7cc4ca853b14628031caf2e6b02047431204
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160121/3d220e82/attachment.html>
More information about the Noosfero-dev
mailing list