Commit 61c09b64 authored by Eric Davis's avatar Eric Davis

Added shoulda macros to test Project's associations

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2936 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 257c92f8
......@@ -34,6 +34,30 @@ class ProjectTest < ActiveSupport::TestCase
should_validate_uniqueness_of :name
should_validate_uniqueness_of :identifier
context "associations" do
should_have_many :members
should_have_many :users, :through => :members
should_have_many :member_principals
should_have_many :principals, :through => :member_principals
should_have_many :enabled_modules
should_have_many :issues
should_have_many :issue_changes, :through => :issues
should_have_many :versions
should_have_many :time_entries
should_have_many :queries
should_have_many :documents
should_have_many :news
should_have_many :issue_categories
should_have_many :boards
should_have_many :changesets, :through => :repository
should_have_one :repository
should_have_one :wiki
should_have_and_belong_to_many :trackers
should_have_and_belong_to_many :issue_custom_fields
end
def test_truth
assert_kind_of Project, @ecookbook
assert_equal "eCookbook", @ecookbook.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment