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

@ -31,7 +31,7 @@ describe Admin::ReportsController do
context 'missing report' do
before do
Report.expects(:find).with('active').returns(nil)
Report.expects(:find).with('active', instance_of(Hash)).returns(nil)
xhr :get, :show, type: 'active'
end
@ -42,7 +42,7 @@ describe Admin::ReportsController do
context 'a report is found' do
before do
Report.expects(:find).with('active').returns(Report.new('active'))
Report.expects(:find).with('active', instance_of(Hash)).returns(Report.new('active'))
xhr :get, :show, type: 'active'
end