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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7db95489
Commit
7db95489
authored
Feb 03, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing specs.
parent
cab34dfb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
spec/lib/gitlab/reference_extractor_spec.rb
spec/lib/gitlab/reference_extractor_spec.rb
+2
-1
spec/models/jira_issue_spec.rb
spec/models/jira_issue_spec.rb
+4
-3
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+2
-2
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+2
-2
No files found.
spec/lib/gitlab/reference_extractor_spec.rb
View file @
7db95489
...
...
@@ -75,10 +75,11 @@ describe Gitlab::ReferenceExtractor do
it
'returns JIRA issues for a JIRA-integrated project'
do
project
.
stub
(
jira_tracker?:
true
)
project
.
stub
(
default_issues_tracker?:
false
)
subject
.
analyze
(
'JIRA-123 and FOOBAR-4567'
,
project
)
subject
.
issues_for
(
project
).
should
eq
(
[
JiraIssue
.
new
(
'JIRA-123'
),
JiraIssue
.
new
(
'FOOBAR-4567'
)]
[
JiraIssue
.
new
(
'JIRA-123'
,
project
),
JiraIssue
.
new
(
'FOOBAR-4567'
,
project
)]
)
end
...
...
spec/models/jira_issue_spec.rb
View file @
7db95489
require
'spec_helper'
describe
JiraIssue
do
subject
{
JiraIssue
.
new
(
'JIRA-123'
)
}
let
(
:project
)
{
create
(
:project
)
}
subject
{
JiraIssue
.
new
(
'JIRA-123'
,
project
)
}
its
(
:id
)
{
should
eq
(
'JIRA-123'
)
}
its
(
:iid
)
{
should
eq
(
'JIRA-123'
)
}
its
(
:to_s
)
{
should
eq
(
'JIRA-123'
)
}
describe
:==
do
specify
{
subject
.
should
eq
(
JiraIssue
.
new
(
'JIRA-123'
))
}
specify
{
subject
.
should_not
eq
(
JiraIssue
.
new
(
'JIRA-124'
))
}
specify
{
subject
.
should
eq
(
JiraIssue
.
new
(
'JIRA-123'
,
project
))
}
specify
{
subject
.
should_not
eq
(
JiraIssue
.
new
(
'JIRA-124'
,
project
))
}
it
'only compares with JiraIssues'
do
subject
.
should_not
eq
(
'JIRA-123'
)
...
...
spec/models/merge_request_spec.rb
View file @
7db95489
...
...
@@ -115,8 +115,8 @@ describe MergeRequest do
end
context
'for a project with JIRA integration'
do
let
(
:issue0
)
{
JiraIssue
.
new
(
'JIRA-123'
)
}
let
(
:issue1
)
{
JiraIssue
.
new
(
'FOOBAR-4567'
)
}
let
(
:issue0
)
{
JiraIssue
.
new
(
'JIRA-123'
,
subject
.
project
)
}
let
(
:issue1
)
{
JiraIssue
.
new
(
'FOOBAR-4567'
,
subject
.
project
)
}
it
'returns sorted JiraIssues'
do
subject
.
project
.
stub
(
default_branch:
subject
.
target_branch
)
...
...
spec/models/project_services/jira_service_spec.rb
View file @
7db95489
...
...
@@ -43,7 +43,7 @@ describe JiraService do
end
it
"should call JIRA API"
do
@jira_service
.
execute
(
@sample_data
,
JiraIssue
.
new
(
"JIRA-123"
))
@jira_service
.
execute
(
@sample_data
,
JiraIssue
.
new
(
"JIRA-123"
,
project
))
WebMock
.
should
have_requested
(
:post
,
@api_url
).
with
(
body:
/Issue solved with/
).
once
...
...
@@ -51,7 +51,7 @@ describe JiraService do
it
"calls the api with jira_issue_transition_id"
do
@jira_service
.
jira_issue_transition_id
=
'this-is-a-custom-id'
@jira_service
.
execute
(
@sample_data
,
JiraIssue
.
new
(
"JIRA-123"
))
@jira_service
.
execute
(
@sample_data
,
JiraIssue
.
new
(
"JIRA-123"
,
project
))
WebMock
.
should
have_requested
(
:post
,
@api_url
).
with
(
body:
/this-is-a-custom-id/
).
once
...
...
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