Sha256: ac142067dd28e40666b885f203b5d99d0e7daa38a12af775d44097db7a434e35
Contents?: true
Size: 812 Bytes
Versions: 54
Compression:
Stored size: 812 Bytes
Contents
require File.expand_path('../abstract_unit', __FILE__) class TestTutorialExample < ActiveSupport::TestCase fixtures :users, :groups, :memberships, :membership_statuses def test_membership membership = Membership.find([1, 1]) assert(membership, "Cannot find a membership") assert(membership.user) assert(membership.group) end def test_status membership = Membership.find([1, 1]) statuses = membership.statuses assert(membership, "Cannot find a membership") assert(statuses, "No has_many association to status") assert_equal(membership, statuses.first.membership) end def test_count membership = Membership.find([1, 1]) assert(membership, "Cannot find a membership") assert_equal(1, membership.statuses.count) end end
Version data entries
54 entries across 54 versions & 1 rubygems