use system user helper and constant when it's referred

This commit is contained in:
Erick Guan
2014-12-18 18:21:06 +08:00
parent 9937af7ac4
commit ceca85c9eb
2 changed files with 2 additions and 2 deletions

View File

@ -432,7 +432,7 @@ describe SessionController do
end
context 'do nothing to system username' do
let(:user) { User.find(-1) }
let(:user) { Discourse.system_user }
it 'generates no token for system username' do
lambda { xhr :post, :forgot_password, login: user.username}.should_not change(EmailToken, :count)