Commit c683f124b283ac36d22462f6bab1c3fde6ae46c5
1 parent
71949171
Exists in
staging
and in
37 other branches
Update Gem 'will_paginate' that contains fix Rails 4 distinct count with multiple fields
Showing
2 changed files
with
21 additions
and
1 deletions
Show diff stats
Gemfile
| ... | ... | @@ -18,7 +18,7 @@ gem 'ruby-feedparser', '~> 0.7' |
| 18 | 18 | gem 'daemons', '~> 1.1' |
| 19 | 19 | gem 'unicorn', '~> 4.8' |
| 20 | 20 | gem 'nokogiri', '~> 1.6.0' |
| 21 | -gem 'will_paginate', '~> 3.0.5.0' | |
| 21 | +gem 'will_paginate', '~> 3.0.7' | |
| 22 | 22 | gem 'pothoven-attachment_fu', '~> 3.2.16' |
| 23 | 23 | gem 'delayed_job' |
| 24 | 24 | gem 'delayed_job_active_record' | ... | ... |
plugins/relevant_content/test/unit/relevant_content_block_test.rb
| ... | ... | @@ -57,4 +57,24 @@ class RelevantContentBlockTest < ActiveSupport::TestCase |
| 57 | 57 | end |
| 58 | 58 | end |
| 59 | 59 | |
| 60 | + should 'check most voted articles from profile with relevant content block' do | |
| 61 | + community = fast_create(Community) | |
| 62 | + article = fast_create(Article, {:name=>'2 votes', :profile_id => community.id}) | |
| 63 | + 2.times{ | |
| 64 | + person = fast_create(Person) | |
| 65 | + person.vote_for(article) | |
| 66 | + } | |
| 67 | + article = fast_create(Article, {:name=>'10 votes', :profile_id => community.id}) | |
| 68 | + 10.times{ | |
| 69 | + person = fast_create(Person) | |
| 70 | + person.vote_for(article) | |
| 71 | + } | |
| 72 | + | |
| 73 | + Box.create!(owner: community) | |
| 74 | + community.boxes[0].blocks << RelevantContentPlugin::RelevantContentBlock.new | |
| 75 | + | |
| 76 | + data = Article.most_voted(community, 5) | |
| 77 | + assert_equal false, data.empty? | |
| 78 | + end | |
| 79 | + | |
| 60 | 80 | end | ... | ... |