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
84c68bb1
Commit
84c68bb1
authored
7 years ago
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address MR comments
parent
a678f42e
No related merge requests found
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
def
terminals
(
environment
)
raise
NotImplementedError
end
def
can_test?
false
end
end
This diff is collapsed.
Click to expand it.
app/models/project_services/jira_service.rb
View file @
84c68bb1
...
...
@@ -91,7 +91,7 @@ class JiraService < IssueTrackerService
{
type:
'text'
,
name:
'project_key'
,
placeholder:
'Project Key'
,
required:
true
},
{
type:
'text'
,
name:
'username'
,
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
...
...
This diff is collapsed.
Click to expand it.
app/models/project_services/mock_ci_service.rb
View file @
84c68bb1
...
...
@@ -80,4 +80,8 @@ class MockCiService < CiService
:error
end
end
def
can_test?
false
end
end
This diff is collapsed.
Click to expand it.
app/models/project_services/mock_monitoring_service.rb
View file @
84c68bb1
...
...
@@ -14,4 +14,8 @@ class MockMonitoringService < MonitoringService
def
metrics
(
environment
)
JSON
.
parse
(
File
.
read
(
Rails
.
root
+
'spec/fixtures/metrics.json'
))
end
def
can_test?
false
end
end
This diff is collapsed.
Click to expand it.
spec/controllers/projects/services_controller_spec.rb
View file @
84c68bb1
...
...
@@ -58,9 +58,6 @@ describe Projects::ServicesController do
expect
(
response
.
status
).
to
eq
(
200
)
end
def
built_service
end
end
context
'failure'
do
...
...
This diff is collapsed.
Click to expand it.
spec/features/projects/services/jira_service_spec.rb
View file @
84c68bb1
...
...
@@ -47,6 +47,18 @@ feature 'Setup Jira service', :feature, :js do
WebMock
.
stub_request
(
:get
,
project_url
).
to_return
(
status:
401
)
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
click_link
(
'JIRA'
)
fill_form
...
...
This diff is collapsed.
Click to expand it.
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