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