##// END OF EJS Templates
Added shoulda macros to test Project's associations...
Eric Davis -
r2822:61c09b644269
parent child
Show More
@@ -34,6 +34,30 class ProjectTest < ActiveSupport::TestCase
34 34 should_validate_uniqueness_of :name
35 35 should_validate_uniqueness_of :identifier
36 36
37 context "associations" do
38 should_have_many :members
39 should_have_many :users, :through => :members
40 should_have_many :member_principals
41 should_have_many :principals, :through => :member_principals
42 should_have_many :enabled_modules
43 should_have_many :issues
44 should_have_many :issue_changes, :through => :issues
45 should_have_many :versions
46 should_have_many :time_entries
47 should_have_many :queries
48 should_have_many :documents
49 should_have_many :news
50 should_have_many :issue_categories
51 should_have_many :boards
52 should_have_many :changesets, :through => :repository
53
54 should_have_one :repository
55 should_have_one :wiki
56
57 should_have_and_belong_to_many :trackers
58 should_have_and_belong_to_many :issue_custom_fields
59 end
60
37 61 def test_truth
38 62 assert_kind_of Project, @ecookbook
39 63 assert_equal "eCookbook", @ecookbook.name
General Comments 0
You need to be logged in to leave comments. Login now