5365: refactor link to object if readable logic
[arvados.git] / apps / workbench / test / integration / report_issue_test.rb
index 7d050f43537680da5b44a166b6901a40cea4baec..4a15851636fba6f0502f741d181af42727a921af 100644 (file)
@@ -2,7 +2,7 @@ require 'integration_helper'
 
 class ReportIssueTest < ActionDispatch::IntegrationTest
   setup do
-    Capybara.current_driver = Capybara.javascript_driver
+    need_javascript
     @user_profile_form_fields = Rails.configuration.user_profile_form_fields
   end
 
@@ -59,6 +59,11 @@ class ReportIssueTest < ActionDispatch::IntegrationTest
       # enter a report text and click on report
       page.find_field('report_issue_text').set 'my test report text'
       assert page.has_button?('Send problem report'), 'Send problem report button not enabled after entering text'
+
+      report = mock
+      report.expects(:deliver).returns true
+      IssueReporter.expects(:send_report).returns report
+
       click_button 'Send problem report'
 
       # ajax success updated button texts and added footer message