]> git.openstreetmap.org Git - rails.git/blob - test/models/report_test.rb
Merge remote-tracking branch 'upstream/pull/2955' into master
[rails.git] / test / models / report_test.rb
1 require "test_helper"
2
3 class ReportTest < ActiveSupport::TestCase
4   def test_issue_required
5     report = create(:report)
6
7     assert report.valid?
8     report.issue = nil
9     assert_not report.valid?
10   end
11
12   def test_user_required
13     report = create(:report)
14
15     assert report.valid?
16     report.user = nil
17     assert_not report.valid?
18   end
19
20   def test_details_required
21     report = create(:report)
22
23     assert report.valid?
24     report.details = ""
25     assert_not report.valid?
26   end
27
28   def test_category_required
29     report = create(:report)
30
31     assert report.valid?
32     report.category = ""
33     assert_not report.valid?
34   end
35 end