1 require 'abstract_unit'
2 require 'fixtures/user'
3 require 'fixtures/group'
4 require 'fixtures/membership_status'
5 require 'fixtures/membership'
7 class TestTutorialExample < Test::Unit::TestCase
8 fixtures :users, :groups, :memberships, :membership_statuses
11 assert(membership = Membership.find(1,1), "Cannot find a membership")
12 assert(membership.user)
13 assert(membership.group)
17 assert(membership = Membership.find(1,1), "Cannot find a membership")
18 assert(statuses = membership.statuses, "No has_many association to status")
19 assert_equal(membership, statuses.first.membership)
23 assert(membership = Membership.find(1,1), "Cannot find a membership")
24 assert_equal(1, membership.statuses.count)