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
Boxiang Sun
gitlab-ce
Commits
ff72de88
Commit
ff72de88
authored
Jun 26, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove use of deprecated webmock feature in jira specs
parent
c8dfdfcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
spec/features/projects/services/jira_service_spec.rb
spec/features/projects/services/jira_service_spec.rb
+7
-7
No files found.
spec/features/projects/services/jira_service_spec.rb
View file @
ff72de88
...
...
@@ -6,7 +6,11 @@ feature 'Setup Jira service', :feature, :js do
let
(
:service
)
{
project
.
create_jira_service
}
let
(
:url
)
{
'http://jira.example.com'
}
let
(
:project_url
)
{
'http://username:password@jira.example.com/rest/api/2/project/GitLabProject'
}
def
stub_project_url
WebMock
.
stub_request
(
:get
,
'http://jira.example.com/rest/api/2/project/GitLabProject'
)
.
with
(
basic_auth:
%w(username password)
)
end
def
fill_form
(
active
=
true
)
check
'Active'
if
active
...
...
@@ -27,9 +31,7 @@ feature 'Setup Jira service', :feature, :js do
describe
'user sets and activates Jira Service'
do
context
'when Jira connection test succeeds'
do
before
do
WebMock
.
stub_request
(
:get
,
project_url
)
end
before
{
stub_project_url
}
it
'activates the JIRA service'
do
click_link
(
'JIRA'
)
...
...
@@ -43,9 +45,7 @@ feature 'Setup Jira service', :feature, :js do
end
context
'when Jira connection test fails'
do
before
do
WebMock
.
stub_request
(
:get
,
project_url
).
to_return
(
status:
401
)
end
before
{
stub_project_url
.
to_return
(
status:
401
)
}
it
'shows errors when some required fields are not filled in'
do
click_link
(
'JIRA'
)
...
...
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