mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Add API support for querying admin reports by date range
This commit is contained in:
parent
fde5e739c9
commit
068d22e9b3
5 changed files with 11 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue