BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
96d35c59
Commit
96d35c59
authored
Mar 09, 2016
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed part of the GitPushService specs
These were broken by commit
21a05328
. Two JIRA tests remain broken but I can't quite figure out how to fix them.
parent
5956ddd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+6
-5
No files found.
spec/services/git_push_service_spec.rb
View file @
96d35c59
...
...
@@ -271,22 +271,24 @@ describe GitPushService, services: true do
allow
(
project
.
repository
).
to
receive
(
:commits_between
).
and_return
([
closing_commit
])
project
.
team
<<
[
commit_author
,
:master
]
end
context
"to default branches"
do
it
"closes issues"
do
execute_service
(
project
,
use
r
,
@oldrev
,
@newrev
,
@ref
)
execute_service
(
project
,
commit_autho
r
,
@oldrev
,
@newrev
,
@ref
)
expect
(
Issue
.
find
(
issue
.
id
)).
to
be_closed
end
it
"adds a note indicating that the issue is now closed"
do
expect
(
SystemNoteService
).
to
receive
(
:change_status
).
with
(
issue
,
project
,
commit_author
,
"closed"
,
closing_commit
)
execute_service
(
project
,
use
r
,
@oldrev
,
@newrev
,
@ref
)
execute_service
(
project
,
commit_autho
r
,
@oldrev
,
@newrev
,
@ref
)
end
it
"doesn't create additional cross-reference notes"
do
expect
(
SystemNoteService
).
not_to
receive
(
:cross_reference
)
execute_service
(
project
,
use
r
,
@oldrev
,
@newrev
,
@ref
)
execute_service
(
project
,
commit_autho
r
,
@oldrev
,
@newrev
,
@ref
)
end
it
"doesn't close issues when external issue tracker is in use"
do
...
...
@@ -294,7 +296,7 @@ describe GitPushService, services: true do
# The push still shouldn't create cross-reference notes.
expect
do
execute_service
(
project
,
use
r
,
@oldrev
,
@newrev
,
'refs/heads/hurf'
)
execute_service
(
project
,
commit_autho
r
,
@oldrev
,
@newrev
,
'refs/heads/hurf'
)
end
.
not_to
change
{
Note
.
where
(
project_id:
project
.
id
,
system:
true
).
count
}
end
end
...
...
@@ -316,7 +318,6 @@ describe GitPushService, services: true do
end
end
# EE-only tests
context
"for jira issue tracker"
do
include
JiraServiceHelper
...
...
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