mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:24:35 +08:00
Support for a new site setting: newuser_spam_host_threshold
. If a new user posts a link
to the same host enough tiles, they will not be able to post the same link again. Additionally, the site will flag all their previous posts with links as spam and they will be instantly hidden via the auto hide workflow.
This commit is contained in:
@ -16,7 +16,6 @@ describe Discourse do
|
||||
end
|
||||
|
||||
context 'base_url' do
|
||||
|
||||
context 'when ssl is off' do
|
||||
before do
|
||||
SiteSetting.expects(:use_ssl?).returns(false)
|
||||
@ -45,12 +44,26 @@ describe Discourse do
|
||||
it "returns the non standart port in the base url" do
|
||||
Discourse.base_url.should == "http://foo.com:3000"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
context '#system_user' do
|
||||
|
||||
let!(:admin) { Fabricate(:admin) }
|
||||
let!(:another_admin) { Fabricate(:another_admin) }
|
||||
|
||||
it 'returns the user specified by the site setting system_username' do
|
||||
SiteSetting.stubs(:system_username).returns(another_admin.username)
|
||||
Discourse.system_user.should == another_admin
|
||||
end
|
||||
|
||||
it 'returns the first admin user otherwise' do
|
||||
SiteSetting.stubs(:system_username).returns(nil)
|
||||
Discourse.system_user.should == admin
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user