mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:24:35 +08:00
Add site setting to disable User Directory, include restricted info
This commit is contained in:
@ -11,6 +11,7 @@ describe DirectoryItemsController do
|
||||
response.should_not be_success
|
||||
end
|
||||
|
||||
|
||||
context "without data" do
|
||||
|
||||
context "and a logged in user" do
|
||||
@ -42,5 +43,12 @@ describe DirectoryItemsController do
|
||||
json['total_rows_directory_items'].should be_present
|
||||
json['load_more_directory_items'].should be_present
|
||||
end
|
||||
|
||||
it "fails when the directory is disabled" do
|
||||
SiteSetting.enable_user_directory = false
|
||||
|
||||
xhr :get, :index, period: 'all'
|
||||
response.should_not be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user