Add API support for querying admin reports by date range

This commit is contained in:
Robin Ward
2014-11-05 13:11:23 -05:00
parent fde5e739c9
commit 068d22e9b3
5 changed files with 11 additions and 12 deletions

View File

@ -30,7 +30,7 @@ describe EmailLog do
it "counts sent emails" do
user.email_logs.create(email_type: 'blah', to_address: user.email)
user.email_logs.create(email_type: 'blah', to_address: user.email, skipped: true)
described_class.count_per_day.first[1].should == 1
described_class.count_per_day(1.day.ago, Time.now).first[1].should == 1
end
end