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
a75d258b
Commit
a75d258b
authored
8 years ago
by
Lucas Gabriel Lima
Browse files
Options
Downloads
Patches
Plain Diff
add test for reporting bug to feedback service
parent
2aeddf93
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/services/feedback_service_test.rb
+12
-5
12 additions, 5 deletions
test/services/feedback_service_test.rb
with
12 additions
and
5 deletions
test/services/feedback_service_test.rb
+
12
−
5
View file @
a75d258b
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
'initialize bug reporter service'
do
feed_back
=
FeedbackService
.
new
(
report_service
)
assert_equal
feed_back
.
get_report_service
,
report_service
test
'initializing bug reporter service'
do
assert_equal
feedback
.
get_report_service
,
report_service
end
#mock.expect(:create_issue, nil)
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