Add a redirect and error message if user ends up trying to report something without the correct parameters

This commit is contained in:
Andy Allan 2018-03-14 17:09:57 +08:00
parent 85bf9adb91
commit 2fc70be734
3 changed files with 14 additions and 1 deletions

View file

@ -49,4 +49,10 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
assert !issue.resolved?
assert issue.open?
end
def test_missing_report_params
sign_in_as(create(:user))
visit new_report_path
assert page.has_content? I18n.t("reports.new.missing_params")
end
end