Enhancements on supports controller

Supports controller now fill the holes in the results: When there are no
supports collected for one interval it takes the accumulated value from the
previous one.

Data starts in the publication date.
This commit is contained in:
Juan Salvador Pérez García
2018-09-14 10:49:29 +02:00
parent f875ded0be
commit 3590657777
3 changed files with 37 additions and 10 deletions

View File

@@ -2,7 +2,7 @@ require 'rails_helper'
describe "Retrieves number of supports for a proposal" do
let(:created_at) { DateTime.parse("2018-01-01 12:00:00") }
let(:proposal) { create(:proposal, created_at: created_at) }
let(:proposal) { create(:proposal, created_at: created_at, published_at: created_at) }
before do
8.times do |i|