Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
5f9cdbab
Commit
5f9cdbab
authored
Dec 03, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify test to pass new project hooks
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
cfcf24dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/observers/merge_request_observer.rb
app/observers/merge_request_observer.rb
+3
-1
spec/observers/merge_request_observer_spec.rb
spec/observers/merge_request_observer_spec.rb
+1
-1
No files found.
app/observers/merge_request_observer.rb
View file @
5f9cdbab
...
@@ -64,6 +64,8 @@ class MergeRequestObserver < ActivityObserver
...
@@ -64,6 +64,8 @@ class MergeRequestObserver < ActivityObserver
end
end
def
execute_hooks
(
merge_request
)
def
execute_hooks
(
merge_request
)
merge_request
.
project
.
execute_hooks
(
merge_request
.
to_hook_data
,
:merge_request_hooks
)
if
merge_request
.
project
merge_request
.
project
.
execute_hooks
(
merge_request
.
to_hook_data
,
:merge_request_hooks
)
end
end
end
end
end
spec/observers/merge_request_observer_spec.rb
View file @
5f9cdbab
...
@@ -4,7 +4,7 @@ describe MergeRequestObserver do
...
@@ -4,7 +4,7 @@ describe MergeRequestObserver do
let
(
:some_user
)
{
create
:user
}
let
(
:some_user
)
{
create
:user
}
let
(
:assignee
)
{
create
:user
}
let
(
:assignee
)
{
create
:user
}
let
(
:author
)
{
create
:user
}
let
(
:author
)
{
create
:user
}
let
(
:mr_mock
)
{
double
(
:merge_request
,
id:
42
,
assignee:
assignee
,
author:
author
)
}
let
(
:mr_mock
)
{
double
(
:merge_request
,
id:
42
,
assignee:
assignee
,
author:
author
)
.
as_null_object
}
let
(
:assigned_mr
)
{
create
(
:merge_request
,
assignee:
assignee
,
author:
author
,
target_project:
create
(
:project
))
}
let
(
:assigned_mr
)
{
create
(
:merge_request
,
assignee:
assignee
,
author:
author
,
target_project:
create
(
:project
))
}
let
(
:unassigned_mr
)
{
create
(
:merge_request
,
author:
author
,
target_project:
create
(
:project
))
}
let
(
:unassigned_mr
)
{
create
(
:merge_request
,
author:
author
,
target_project:
create
(
:project
))
}
let
(
:closed_assigned_mr
)
{
create
(
:closed_merge_request
,
assignee:
assignee
,
author:
author
,
target_project:
create
(
:project
))
}
let
(
:closed_assigned_mr
)
{
create
(
:closed_merge_request
,
assignee:
assignee
,
author:
author
,
target_project:
create
(
:project
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment