Commit 3d51147d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add user_id to system hook when new user created

parent 07437ac3
......@@ -36,7 +36,8 @@ class SystemHooksService
when User
data.merge!({
name: model.name,
email: model.email
email: model.email,
user_id: model.id
})
when UsersProject
data.merge!({
......
......@@ -7,7 +7,7 @@ describe SystemHooksService do
context 'it should build event data' do
it 'should build event data for user' do
SystemHooksService.build_event_data(user, :create).should include(:event_name, :name, :created_at, :email)
SystemHooksService.build_event_data(user, :create).should include(:event_name, :name, :created_at, :email, :user_id)
end
it 'should build event data for project' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment