mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:41:25 +08:00
FIX: Server error when no results on user directory while logged in
This commit is contained in:
@ -11,6 +11,21 @@ describe DirectoryItemsController do
|
||||
response.should_not be_success
|
||||
end
|
||||
|
||||
context "without data" do
|
||||
|
||||
context "and a logged in user" do
|
||||
let!(:user) { log_in }
|
||||
|
||||
it "succeeds" do
|
||||
xhr :get, :index, period: 'all'
|
||||
response.should be_success
|
||||
json = ::JSON.parse(response.body)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
context "with data" do
|
||||
before do
|
||||
Fabricate(:user)
|
||||
|
Reference in New Issue
Block a user