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
84c68bb1
Commit
84c68bb1
authored
May 30, 2017
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address MR comments
parent
a678f42e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
4 deletions
+25
-4
app/models/project_services/deployment_service.rb
app/models/project_services/deployment_service.rb
+4
-0
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+1
-1
app/models/project_services/mock_ci_service.rb
app/models/project_services/mock_ci_service.rb
+4
-0
app/models/project_services/mock_monitoring_service.rb
app/models/project_services/mock_monitoring_service.rb
+4
-0
spec/controllers/projects/services_controller_spec.rb
spec/controllers/projects/services_controller_spec.rb
+0
-3
spec/features/projects/services/jira_service_spec.rb
spec/features/projects/services/jira_service_spec.rb
+12
-0
No files found.
app/models/project_services/deployment_service.rb
View file @
84c68bb1
...
@@ -30,4 +30,8 @@ class DeploymentService < Service
...
@@ -30,4 +30,8 @@ class DeploymentService < Service
def
terminals
(
environment
)
def
terminals
(
environment
)
raise
NotImplementedError
raise
NotImplementedError
end
end
def
can_test?
false
end
end
end
app/models/project_services/jira_service.rb
View file @
84c68bb1
...
@@ -91,7 +91,7 @@ class JiraService < IssueTrackerService
...
@@ -91,7 +91,7 @@ class JiraService < IssueTrackerService
{
type:
'text'
,
name:
'project_key'
,
placeholder:
'Project Key'
,
required:
true
},
{
type:
'text'
,
name:
'project_key'
,
placeholder:
'Project Key'
,
required:
true
},
{
type:
'text'
,
name:
'username'
,
placeholder:
''
,
required:
true
},
{
type:
'text'
,
name:
'username'
,
placeholder:
''
,
required:
true
},
{
type:
'password'
,
name:
'password'
,
placeholder:
''
,
required:
true
},
{
type:
'password'
,
name:
'password'
,
placeholder:
''
,
required:
true
},
{
type:
'text'
,
name:
'jira_issue_transition_id'
,
placeholder:
''
,
required:
true
}
{
type:
'text'
,
name:
'jira_issue_transition_id'
,
placeholder:
''
}
]
]
end
end
...
...
app/models/project_services/mock_ci_service.rb
View file @
84c68bb1
...
@@ -80,4 +80,8 @@ class MockCiService < CiService
...
@@ -80,4 +80,8 @@ class MockCiService < CiService
:error
:error
end
end
end
end
def
can_test?
false
end
end
end
app/models/project_services/mock_monitoring_service.rb
View file @
84c68bb1
...
@@ -14,4 +14,8 @@ class MockMonitoringService < MonitoringService
...
@@ -14,4 +14,8 @@ class MockMonitoringService < MonitoringService
def
metrics
(
environment
)
def
metrics
(
environment
)
JSON
.
parse
(
File
.
read
(
Rails
.
root
+
'spec/fixtures/metrics.json'
))
JSON
.
parse
(
File
.
read
(
Rails
.
root
+
'spec/fixtures/metrics.json'
))
end
end
def
can_test?
false
end
end
end
spec/controllers/projects/services_controller_spec.rb
View file @
84c68bb1
...
@@ -58,9 +58,6 @@ describe Projects::ServicesController do
...
@@ -58,9 +58,6 @@ describe Projects::ServicesController do
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
response
.
status
).
to
eq
(
200
)
end
end
def
built_service
end
end
end
context
'failure'
do
context
'failure'
do
...
...
spec/features/projects/services/jira_service_spec.rb
View file @
84c68bb1
...
@@ -47,6 +47,18 @@ feature 'Setup Jira service', :feature, :js do
...
@@ -47,6 +47,18 @@ feature 'Setup Jira service', :feature, :js do
WebMock
.
stub_request
(
:get
,
project_url
).
to_return
(
status:
401
)
WebMock
.
stub_request
(
:get
,
project_url
).
to_return
(
status:
401
)
end
end
it
'shows errors when some required fields are not filled in'
do
click_link
(
'JIRA'
)
check
'Active'
fill_in
'service_password'
,
with:
'password'
click_button
(
'Test settings and save changes'
)
page
.
within
(
'.service-settings'
)
do
expect
(
page
).
to
have_content
(
'This field is required.'
)
end
end
it
'activates the JIRA service'
do
it
'activates the JIRA service'
do
click_link
(
'JIRA'
)
click_link
(
'JIRA'
)
fill_form
fill_form
...
...
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