Avoid submit_tag to avoid 'Save changes' default
authorAndy Allan <git@gravitystorm.co.uk>
Fri, 23 Feb 2018 04:30:37 +0000 (12:30 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Fri, 23 Feb 2018 04:30:37 +0000 (12:30 +0800)
app/views/reports/new.html.erb
test/system/report_diary_entry_test.rb

index 705457c..7acf91d 100644 (file)
@@ -36,7 +36,7 @@
     </div>
 
     <div class='buttons'>
     </div>
 
     <div class='buttons'>
-      <%= submit_tag %>
+      <%= f.submit %>
     </div>
   </fieldset>
 <% end %>
     </div>
   </fieldset>
 <% end %>
index 542e8ba..988bfbe 100644 (file)
@@ -24,7 +24,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
 
     choose I18n.t("reports.categories.DiaryEntry.spam")
     fill_in "report_details", :with => "This is advertising"
 
     choose I18n.t("reports.categories.DiaryEntry.spam")
     fill_in "report_details", :with => "This is advertising"
-    click_on "Save changes"
+    click_on "Create Report"
 
     assert page.has_content? "Your report has been registered sucessfully"
   end
 
     assert page.has_content? "Your report has been registered sucessfully"
   end
@@ -43,7 +43,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
 
     choose I18n.t("reports.categories.DiaryEntry.spam")
     fill_in "report_details", :with => "This is advertising"
 
     choose I18n.t("reports.categories.DiaryEntry.spam")
     fill_in "report_details", :with => "This is advertising"
-    click_on "Save changes"
+    click_on "Create Report"
 
     issue.reload
     assert !issue.resolved?
 
     issue.reload
     assert !issue.resolved?