2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

FEATURE: Add site setting to disable group directory.

This commit is contained in:
Guo Xiang Tan 2016-12-22 14:14:03 +08:00
parent c531f4ded5
commit 8551d821a0
5 changed files with 22 additions and 1 deletions

View file

@ -14,6 +14,15 @@ describe "Groups" do
group.update_attributes!(automatic: true, visible: true)
end
context 'when group directory is disabled' do
site_setting(:enable_group_directory, false)
it 'should deny access' do
get "/groups.json"
expect(response).to be_forbidden
end
end
it 'should return the right response' do
get "/groups.json"