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
e57d1bbf
Commit
e57d1bbf
authored
Jun 26, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm use of deprecated webmock api in jira model spec
parent
9ca4a398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+11
-11
No files found.
spec/models/project_services/jira_service_spec.rb
View file @
e57d1bbf
...
...
@@ -106,15 +106,15 @@ describe JiraService, models: true do
@jira_service
.
save
project_issues_url
=
'http://
gitlab_jira_username:gitlab_jira_password@
jira.example.com/rest/api/2/issue/JIRA-123'
@transitions_url
=
'http://
gitlab_jira_username:gitlab_jira_password@
jira.example.com/rest/api/2/issue/JIRA-123/transitions'
@comment_url
=
'http://
gitlab_jira_username:gitlab_jira_password@
jira.example.com/rest/api/2/issue/JIRA-123/comment'
@remote_link_url
=
'http://
gitlab_jira_username:gitlab_jira_password@
jira.example.com/rest/api/2/issue/JIRA-123/remotelink'
WebMock
.
stub_request
(
:get
,
project_issues_url
)
WebMock
.
stub_request
(
:post
,
@transitions_url
)
WebMock
.
stub_request
(
:post
,
@comment_url
)
WebMock
.
stub_request
(
:post
,
@remote_link_url
)
project_issues_url
=
'http://jira.example.com/rest/api/2/issue/JIRA-123'
@transitions_url
=
'http://jira.example.com/rest/api/2/issue/JIRA-123/transitions'
@comment_url
=
'http://jira.example.com/rest/api/2/issue/JIRA-123/comment'
@remote_link_url
=
'http://jira.example.com/rest/api/2/issue/JIRA-123/remotelink'
WebMock
.
stub_request
(
:get
,
project_issues_url
)
.
with
(
basic_auth:
%w(gitlab_jira_username gitlab_jira_password)
)
WebMock
.
stub_request
(
:post
,
@transitions_url
)
.
with
(
basic_auth:
%w(gitlab_jira_username gitlab_jira_password)
)
WebMock
.
stub_request
(
:post
,
@comment_url
)
.
with
(
basic_auth:
%w(gitlab_jira_username gitlab_jira_password)
)
WebMock
.
stub_request
(
:post
,
@remote_link_url
)
.
with
(
basic_auth:
%w(gitlab_jira_username gitlab_jira_password)
)
end
it
"calls JIRA API"
do
...
...
@@ -202,9 +202,9 @@ describe JiraService, models: true do
end
def
test_settings
(
api_url
)
project_url
=
"http://
jira_username:jira_password@
#{
api_url
}
/rest/api/2/project/GitLabProject"
project_url
=
"http://
#{
api_url
}
/rest/api/2/project/GitLabProject"
WebMock
.
stub_request
(
:get
,
project_url
)
WebMock
.
stub_request
(
:get
,
project_url
)
.
with
(
basic_auth:
%w(jira_username jira_password)
)
jira_service
.
test_settings
end
...
...
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