mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Add API support for querying admin reports by date range
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user