Commit 2ebc7cc4ca853b14628031caf2e6b02047431204

Authored by Antonio Terceiro
1 parent d6a8cdf5

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.
plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
... ... @@ -31,7 +31,7 @@ class TrackListBlockTest < ActiveSupport::TestCase
31 31  
32 32 should 'list of articles be limited by block configuration' do
33 33 (@block.limit + 1).times { |i| create_track("track#{i}", profile) }
34   - assert_equal @block.limit, @block.tracks.size
  34 + assert_equal @block.limit, @block.tracks.to_a.size
35 35 end
36 36  
37 37 should 'return more link if has more tracks to show' do
... ...