mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
reset bounce score when email is successfully changed
This commit is contained in:
@ -33,9 +33,17 @@ describe UsersEmailController do
|
||||
end
|
||||
|
||||
it 'confirms with a correct token' do
|
||||
user.user_stat.update_columns(bounce_score: 42, reset_bounce_score_after: 1.week.from_now)
|
||||
|
||||
get :confirm, token: user.email_tokens.last.token
|
||||
|
||||
expect(response).to be_success
|
||||
expect(assigns(:update_result)).to eq(:complete)
|
||||
|
||||
user.reload
|
||||
|
||||
expect(user.user_stat.bounce_score).to eq(0)
|
||||
expect(user.user_stat.reset_bounce_score_after).to eq(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user