Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
4c541a32
Commit
4c541a32
authored
8 years ago
by
Israel Barreto Sant'Anna
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into search-api
parents
0c071080
f247ab50
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/services/feedback_service.rb
+5
-1
5 additions, 1 deletion
app/services/feedback_service.rb
test/services/feedback_service_test.rb
+21
-0
21 additions, 0 deletions
test/services/feedback_service_test.rb
with
26 additions
and
1 deletion
app/services/feedback_service.rb
+
5
−
1
View file @
4c541a32
...
...
@@ -6,6 +6,10 @@ class FeedbackService
@bugreporter_service
=
bugreporter_service
end
def
get_report_service
@bugreporter_service
end
##
# delegates the behavior for a bug reporter service
def
report_bug
(
bug
)
...
...
@@ -20,4 +24,4 @@ class FeedbackService
# send notification
end
end
\ No newline at end of file
end
This diff is collapsed.
Click to expand it.
test/services/feedback_service_test.rb
0 → 100644
+
21
−
0
View file @
4c541a32
require
'test_helper'
class
FeedbackServiceTest
<
ActiveSupport
::
TestCase
PORTALMEC_PROJECT_ID
=
633
mock
=
MiniTest
::
Mock
.
new
report_service
=
GitlabBugreporterService
.
new
(
mock
)
feedback
=
FeedbackService
.
new
(
report_service
)
test
'initializing bug reporter service'
do
assert_equal
feedback
.
get_report_service
,
report_service
end
test
'reporting bug'
do
bug
=
Bug
.
new
bug
.
title
=
'Título'
bug
.
description
=
'Descrição do bug'
mock
.
expect
(
:create_issue
,
nil
,
[
PORTALMEC_PROJECT_ID
,
bug
.
title
,
description:
bug
.
description
])
assert
feedback
.
report_bug
(
bug
)
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment