mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: log only 1 'show email' record
This commit is contained in:
parent
b48f04e772
commit
bfbc49ef6f
2 changed files with 7 additions and 15 deletions
|
@ -33,13 +33,13 @@ describe Admin::UsersController do
|
|||
end
|
||||
end
|
||||
|
||||
it "logs an enty for all email shown" do
|
||||
it "logs only 1 enty" do
|
||||
UserHistory.where(action: UserHistory.actions[:check_email], acting_user_id: @user.id).count.should == 0
|
||||
|
||||
xhr :get, :index, show_emails: "true"
|
||||
data = ::JSON.parse(response.body)
|
||||
|
||||
UserHistory.where(action: UserHistory.actions[:check_email], acting_user_id: @user.id).count.should == data.length
|
||||
UserHistory.where(action: UserHistory.actions[:check_email], acting_user_id: @user.id).count.should == 1
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue