mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 04:28:29 -05:00
Don't call discourse hub during user destroy if hub integration is disabled
This commit is contained in:
@@ -86,10 +86,17 @@ describe UserDestroyer do
|
||||
destroy
|
||||
end
|
||||
|
||||
it 'should unregister the nickname as the discourse hub' do
|
||||
it 'should unregister the nickname as the discourse hub if hub integration is enabled' do
|
||||
SiteSetting.stubs(:call_discourse_hub?).returns(true)
|
||||
DiscourseHub.expects(:unregister_nickname).with(@user.username)
|
||||
destroy
|
||||
end
|
||||
|
||||
it 'should not try to unregister the nickname as the discourse hub if hub integration is disabled' do
|
||||
SiteSetting.stubs(:call_discourse_hub?).returns(false)
|
||||
DiscourseHub.expects(:unregister_nickname).never
|
||||
destroy
|
||||
end
|
||||
end
|
||||
|
||||
context 'and destroy fails' do
|
||||
|
||||
Reference in New Issue
Block a user