]> git.openstreetmap.org Git - rails.git/blob - test/models/report_test.rb
Use lazy lookups for translations in issues
[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 !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 !report.valid?
18   end
19
20   def test_details_required
21     report = create(:report)
22
23     assert report.valid?
24     report.details = ""
25     assert !report.valid?
26   end
27
28   def test_category_required
29     report = create(:report)
30
31     assert report.valid?
32     report.category = ""
33     assert !report.valid?
34   end
35 end