Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
54fb0f85
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
54fb0f85
编写于
12月 19, 2011
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'notification_refactoring'
上级
f09e1599
839aa735
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
265 addition
and
65 deletion
+265
-65
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+0
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+5
-0
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-4
app/controllers/notes_controller.rb
app/controllers/notes_controller.rb
+2
-22
app/mailers/notify.rb
app/mailers/notify.rb
+31
-0
app/models/issue.rb
app/models/issue.rb
+1
-0
app/models/mailer_observer.rb
app/models/mailer_observer.rb
+75
-0
app/models/merge_request.rb
app/models/merge_request.rb
+16
-0
app/models/note.rb
app/models/note.rb
+5
-0
app/models/project.rb
app/models/project.rb
+10
-9
app/models/users_project.rb
app/models/users_project.rb
+7
-8
app/views/notify/changed_issue_email.html.haml
app/views/notify/changed_issue_email.html.haml
+16
-0
app/views/notify/changed_merge_request_email.html.haml
app/views/notify/changed_merge_request_email.html.haml
+16
-0
app/views/notify/new_issue_email.html.haml
app/views/notify/new_issue_email.html.haml
+1
-1
app/views/notify/new_merge_request_email.html.haml
app/views/notify/new_merge_request_email.html.haml
+20
-0
app/views/notify/note_merge_request_email.html.haml
app/views/notify/note_merge_request_email.html.haml
+23
-0
config/application.rb
config/application.rb
+1
-1
spec/models/issue_spec.rb
spec/models/issue_spec.rb
+1
-0
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+16
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+10
-9
spec/models/users_project_spec.rb
spec/models/users_project_spec.rb
+7
-8
spec/requests/issues_spec.rb
spec/requests/issues_spec.rb
+1
-2
未找到文件。
app/controllers/admin/users_controller.rb
浏览文件 @
54fb0f85
...
...
@@ -27,7 +27,6 @@ class Admin::UsersController < ApplicationController
respond_to
do
|
format
|
if
@admin_user
.
save
Notify
.
new_user_email
(
@admin_user
,
params
[
:user
][
:password
]).
deliver
format
.
html
{
redirect_to
[
:admin
,
@admin_user
],
notice:
'User was successfully created.'
}
format
.
json
{
render
json:
@admin_user
,
status: :created
,
location:
@admin_user
}
else
...
...
app/controllers/application_controller.rb
浏览文件 @
54fb0f85
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:set_current_user_for_mailer
protect_from_forgery
helper_method
:abilities
,
:can?
...
...
@@ -19,6 +20,10 @@ class ApplicationController < ActionController::Base
end
end
def
set_current_user_for_mailer
MailerObserver
.
current_user
=
current_user
end
def
abilities
@abilities
||=
Six
.
new
end
...
...
app/controllers/issues_controller.rb
浏览文件 @
54fb0f85
...
...
@@ -67,10 +67,7 @@ class IssuesController < ApplicationController
def
create
@issue
=
@project
.
issues
.
new
(
params
[
:issue
])
@issue
.
author
=
current_user
if
@issue
.
save
&&
@issue
.
assignee
!=
current_user
Notify
.
new_issue_email
(
@issue
).
deliver
end
@issue
.
save
respond_with
(
@issue
)
end
...
...
app/controllers/notes_controller.rb
浏览文件 @
54fb0f85
...
...
@@ -12,10 +12,8 @@ class NotesController < ApplicationController
def
create
@note
=
@project
.
notes
.
new
(
params
[
:note
])
@note
.
author
=
current_user
if
@note
.
save
notify
if
params
[
:notify
]
==
'1'
end
@note
.
notify
=
true
if
params
[
:notify
]
==
'1'
@note
.
save
respond_to
do
|
format
|
format
.
html
{
redirect_to
:back
}
...
...
@@ -35,22 +33,4 @@ class NotesController < ApplicationController
end
end
protected
def
notify
@project
.
users
.
reject
{
|
u
|
u
.
id
==
current_user
.
id
}
.
each
do
|
u
|
case
@note
.
noteable_type
when
"Commit"
then
Notify
.
note_commit_email
(
u
,
@note
).
deliver
when
"Issue"
then
Notify
.
note_issue_email
(
u
,
@note
).
deliver
when
"MergeRequest"
true
# someone should write email notification
when
"Snippet"
true
else
Notify
.
note_wall_email
(
u
,
@note
).
deliver
end
end
end
end
app/mailers/notify.rb
浏览文件 @
54fb0f85
...
...
@@ -30,6 +30,14 @@ class Notify < ActionMailer::Base
@commit
=
@project
.
repo
.
commits
(
note
.
noteable_id
).
first
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
end
def
note_merge_request_email
(
user
,
note
)
@user
=
user
@note
=
note
@project
=
note
.
project
@merge_request
=
note
.
noteable
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
end
def
note_issue_email
(
user
,
note
)
@user
=
user
...
...
@@ -38,4 +46,27 @@ class Notify < ActionMailer::Base
@issue
=
note
.
noteable
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
end
def
new_merge_request_email
(
merge_request
)
@user
=
merge_request
.
assignee
@merge_request
=
merge_request
@project
=
merge_request
.
project
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@merge_request
.
title
}
"
)
end
def
changed_merge_request_email
(
user
,
merge_request
)
@user
=
user
@assignee_was
||=
User
.
find
(
merge_request
.
assignee_id_was
)
@merge_request
=
merge_request
@project
=
merge_request
.
project
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@merge_request
.
title
}
"
)
end
def
changed_issue_email
(
user
,
issue
)
@user
=
user
@assignee_was
||=
User
.
find
(
issue
.
assignee_id_was
)
@issue
=
issue
@project
=
issue
.
project
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@issue
.
title
}
"
)
end
end
app/models/issue.rb
浏览文件 @
54fb0f85
...
...
@@ -59,5 +59,6 @@ end
# closed :boolean default(FALSE), not null
# position :integer default(0)
# critical :boolean default(FALSE), not null
# branch_name :string(255)
#
app/models/mailer_observer.rb
0 → 100644
浏览文件 @
54fb0f85
class
MailerObserver
<
ActiveRecord
::
Observer
observe
:issue
,
:user
,
:note
,
:merge_request
cattr_accessor
:current_user
def
after_create
(
model
)
new_issue
(
model
)
if
model
.
kind_of?
(
Issue
)
new_user
(
model
)
if
model
.
kind_of?
(
User
)
new_note
(
model
)
if
model
.
kind_of?
(
Note
)
new_merge_request
(
model
)
if
model
.
kind_of?
(
MergeRequest
)
end
def
after_update
(
model
)
changed_merge_request
(
model
)
if
model
.
kind_of?
(
MergeRequest
)
changed_issue
(
model
)
if
model
.
kind_of?
(
Issue
)
end
protected
def
new_issue
(
issue
)
if
issue
.
assignee
!=
current_user
Notify
.
new_issue_email
(
issue
).
deliver
end
end
def
new_user
(
user
)
Notify
.
new_user_email
(
user
,
user
.
password
).
deliver
end
def
new_note
(
note
)
return
unless
note
.
notify
note
.
project
.
users
.
reject
{
|
u
|
u
.
id
==
current_user
.
id
}
.
each
do
|
u
|
case
note
.
noteable_type
when
"Commit"
then
Notify
.
note_commit_email
(
u
,
note
).
deliver
when
"Issue"
then
Notify
.
note_issue_email
(
u
,
note
).
deliver
when
"MergeRequest"
then
Notify
.
note_merge_request_email
(
u
,
note
).
deliver
when
"Snippet"
true
else
Notify
.
note_wall_email
(
u
,
note
).
deliver
end
end
end
def
new_merge_request
(
merge_request
)
if
merge_request
.
assignee
!=
current_user
Notify
.
new_merge_request_email
(
merge_request
).
deliver
end
end
def
changed_merge_request
(
merge_request
)
if
merge_request
.
assignee_id_changed?
recipients_ids
=
merge_request
.
assignee_id_was
,
merge_request
.
assignee_id
recipients_ids
.
delete
current_user
.
id
User
.
find
(
recipients_ids
).
each
do
|
user
|
Notify
.
changed_merge_request_email
(
user
,
merge_request
).
deliver
end
end
end
def
changed_issue
(
issue
)
if
issue
.
assignee_id_changed?
recipients_ids
=
issue
.
assignee_id_was
,
issue
.
assignee_id
recipients_ids
.
delete
current_user
.
id
User
.
find
(
recipients_ids
).
each
do
|
user
|
Notify
.
changed_issue_email
(
user
,
issue
).
deliver
end
end
end
end
app/models/merge_request.rb
浏览文件 @
54fb0f85
...
...
@@ -44,3 +44,19 @@ class MergeRequest < ActiveRecord::Base
project
.
commit
(
source_branch
)
end
end
# == Schema Information
#
# Table name: merge_requests
#
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# closed :boolean default(FALSE), not null
# created_at :datetime
# updated_at :datetime
#
app/models/note.rb
浏览文件 @
54fb0f85
...
...
@@ -13,6 +13,7 @@ class Note < ActiveRecord::Base
:prefix
=>
true
attr_protected
:author
,
:author_id
attr_accessor
:notify
validates_presence_of
:project
...
...
@@ -35,6 +36,10 @@ class Note < ActiveRecord::Base
scope
:inc_author
,
includes
(
:author
)
mount_uploader
:attachment
,
AttachmentUploader
def
notify
@notify
||=
false
end
end
# == Schema Information
#
...
...
app/models/project.rb
浏览文件 @
54fb0f85
...
...
@@ -247,14 +247,15 @@ end
#
# Table name: projects
#
# id :integer not null, primary key
# name :string(255)
# path :string(255)
# description :text
# created_at :datetime
# updated_at :datetime
# private_flag :boolean default(TRUE), not null
# code :string(255)
# owner_id :integer
# id :integer not null, primary key
# name :string(255)
# path :string(255)
# description :text
# created_at :datetime
# updated_at :datetime
# private_flag :boolean default(TRUE), not null
# code :string(255)
# owner_id :integer
# default_branch :string(255) default("master"), not null
#
app/models/users_project.rb
浏览文件 @
54fb0f85
...
...
@@ -23,13 +23,12 @@ end
#
# Table name: users_projects
#
# id :integer not null, primary key
# user_id :integer not null
# project_id :integer not null
# read :boolean default(FALSE)
# write :boolean default(FALSE)
# admin :boolean default(FALSE)
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# user_id :integer not null
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# repo_access :integer default(0), not null
# project_access :integer default(0), not null
#
app/views/notify/changed_issue_email.html.haml
0 → 100644
浏览文件 @
54fb0f85
%td
.content
{
:align
=>
"left"
,
:style
=>
"font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;"
,
:valign
=>
"top"
,
:width
=>
"600"
}
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:style
=>
"color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;"
,
:width
=>
"600"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
Reassigned Issue
=
link_to
truncate
(
@issue
.
title
,
:length
=>
16
),
project_issue_url
(
@project
,
@issue
)
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:style
=>
"padding: 15px 0 15px;"
,
:valign
=>
"top"
}
%p
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
Assignee changed from
#{
@assignee_was
.
name
}
to
#{
@issue
.
assignee
.
name
}
%td
app/views/notify/changed_merge_request_email.html.haml
0 → 100644
浏览文件 @
54fb0f85
%td
.content
{
:align
=>
"left"
,
:style
=>
"font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;"
,
:valign
=>
"top"
,
:width
=>
"600"
}
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:style
=>
"color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;"
,
:width
=>
"600"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
Reassigned Merge Request
=
link_to
truncate
(
@merge_request
.
title
,
:length
=>
16
),
project_merge_request_url
(
@project
,
@merge_request
)
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:style
=>
"padding: 15px 0 15px;"
,
:valign
=>
"top"
}
%p
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
Assignee changed from
#{
@assignee_was
.
name
}
to
#{
@merge_request
.
assignee
.
name
}
%td
app/views/notify/new_issue_email.html.haml
浏览文件 @
54fb0f85
...
...
@@ -4,7 +4,7 @@
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
Hi
#{
@user
.
name
}
!
New Issue was created and assigned to you.
New Issue was created and assigned to you.
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
...
...
app/views/notify/new_merge_request_email.html.haml
0 → 100644
浏览文件 @
54fb0f85
%td
.content
{
:align
=>
"left"
,
:style
=>
"font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;"
,
:valign
=>
"top"
,
:width
=>
"600"
}
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:style
=>
"color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;"
,
:width
=>
"600"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
New Merge Request
=
link_to
truncate
(
@merge_request
.
title
,
:length
=>
16
),
project_merge_request_url
(
@project
,
@merge_request
)
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:style
=>
"padding: 15px 0 15px;"
,
:valign
=>
"top"
}
%p
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
Branches:
#{
@merge_request
.
source_branch
}
→
#{
@merge_request
.
target_branch
}
%p
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
Asignee:
#{
@merge_request
.
author
.
name
}
→
#{
@merge_request
.
assignee
.
name
}
%td
app/views/notify/note_merge_request_email.html.haml
0 → 100644
浏览文件 @
54fb0f85
%td
.content
{
:align
=>
"left"
,
:style
=>
"font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;"
,
:valign
=>
"top"
,
:width
=>
"600"
}
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:style
=>
"color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;"
,
:width
=>
"600"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
New comment for Merge Request
=
link_to
truncate
(
@merge_request
.
title
,
:length
=>
16
),
project_merge_request_url
(
@project
,
@merge_request
,
:anchor
=>
"note_
#{
@note
.
id
}
"
)
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:style
=>
"padding: 15px 0 15px;"
,
:valign
=>
"top"
}
%p
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
%a
{
:href
=>
"#"
,
:style
=>
"color: #0eb6ce; text-decoration: none;"
}
#{
@note
.
author
.
name
}
left next message:
%br
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:width
=>
"558"
}
%tr
%td
{
:valign
=>
"top"
}
%cite
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
=
@note
.
note
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
config/application.rb
浏览文件 @
54fb0f85
...
...
@@ -23,7 +23,7 @@ module Gitlab
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum
_observer
config
.
active_record
.
observers
=
:mailer
_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
...
...
spec/models/issue_spec.rb
浏览文件 @
54fb0f85
...
...
@@ -39,5 +39,6 @@ end
# closed :boolean default(FALSE), not null
# position :integer default(0)
# critical :boolean default(FALSE), not null
# branch_name :string(255)
#
spec/models/merge_request_spec.rb
浏览文件 @
54fb0f85
...
...
@@ -26,3 +26,19 @@ describe MergeRequest do
:assignee
=>
Factory
(
:user
),
:project
=>
Factory
.
create
(
:project
)).
should
be_valid
}
end
# == Schema Information
#
# Table name: merge_requests
#
# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
# project_id :integer not null
# author_id :integer
# assignee_id :integer
# title :string(255)
# closed :boolean default(FALSE), not null
# created_at :datetime
# updated_at :datetime
#
spec/models/project_spec.rb
浏览文件 @
54fb0f85
...
...
@@ -168,14 +168,15 @@ end
#
# Table name: projects
#
# id :integer not null, primary key
# name :string(255)
# path :string(255)
# description :text
# created_at :datetime
# updated_at :datetime
# private_flag :boolean default(TRUE), not null
# code :string(255)
# owner_id :integer
# id :integer not null, primary key
# name :string(255)
# path :string(255)
# description :text
# created_at :datetime
# updated_at :datetime
# private_flag :boolean default(TRUE), not null
# code :string(255)
# owner_id :integer
# default_branch :string(255) default("master"), not null
#
spec/models/users_project_spec.rb
浏览文件 @
54fb0f85
...
...
@@ -20,13 +20,12 @@ end
#
# Table name: users_projects
#
# id :integer not null, primary key
# user_id :integer not null
# project_id :integer not null
# read :boolean default(FALSE)
# write :boolean default(FALSE)
# admin :boolean default(FALSE)
# created_at :datetime
# updated_at :datetime
# id :integer not null, primary key
# user_id :integer not null
# project_id :integer not null
# created_at :datetime
# updated_at :datetime
# repo_access :integer default(0), not null
# project_access :integer default(0), not null
#
spec/requests/issues_spec.rb
浏览文件 @
54fb0f85
...
...
@@ -147,13 +147,12 @@ describe "Issues" do
click_button
"Save"
end
it
"should send valid email to user
with email & password
"
do
it
"should send valid email to user"
do
click_button
"Save"
issue
=
Issue
.
last
email
=
ActionMailer
::
Base
.
deliveries
.
last
email
.
subject
.
should
have_content
(
"New Issue was created"
)
email
.
body
.
should
have_content
(
issue
.
title
)
email
.
body
.
should
have_content
(
issue
.
assignee
.
name
)
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录