Skip to content
Snippets Groups Projects
Commit a75d258b authored by Lucas Gabriel Lima's avatar Lucas Gabriel Lima
Browse files

add test for reporting bug to feedback service

parent 2aeddf93
No related branches found
No related tags found
No related merge requests found
require 'test_helper' require 'test_helper'
class FeedbackServiceTest < ActiveSupport::TestCase class FeedbackServiceTest < ActiveSupport::TestCase
PORTALMEC_PROJECT_ID = 633
mock = MiniTest::Mock.new mock = MiniTest::Mock.new
report_service = GitlabBugreporterService.new(mock) report_service = GitlabBugreporterService.new(mock)
feedback = FeedbackService.new(report_service)
test 'initialize bug reporter service' do test 'initializing bug reporter service' do
feed_back = FeedbackService.new(report_service) assert_equal feedback.get_report_service, report_service
assert_equal feed_back.get_report_service, report_service
end 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 end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment