mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
7c17966171
https://meta.discourse.org/t/should-the-email-address-of-a-new-user-be-included-in-the-webhook/59255
15 lines
346 B
Ruby
15 lines
346 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe WebHookUserSerializer do
|
|
let(:user) { Fabricate(:user) }
|
|
let(:admin) { Fabricate(:admin) }
|
|
|
|
subject { described_class.new(user, scope: Guardian.new(admin), root: false) }
|
|
|
|
it "should include the user's email" do
|
|
payload = subject.as_json
|
|
|
|
expect(payload[:email]).to eq(user.email)
|
|
end
|
|
end
|