Sha256: 35aae578584684b0a66776efbbc7b01e0435ccffe5963e5cc74ee79f3928037c
Contents?: true
Size: 441 Bytes
Versions: 29
Compression:
Stored size: 441 Bytes
Contents
require File.expand_path('../abstract_unit', __FILE__) class TestValidations < ActiveSupport::TestCase fixtures :students, :dorms, :rooms, :room_assignments def test_uniqueness_validation_persisted room_assignment = RoomAssignment.find([1, 1, 1]) assert(room_assignment.valid?) room_assignment = RoomAssignment.new(:student_id => 1, :dorm_id => 1, :room_id => 2) assert(!room_assignment.valid?) end end
Version data entries
29 entries across 29 versions & 1 rubygems