Skip to content

Commit

Permalink
not checked out scope for assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
kbl committed Jan 16, 2012
1 parent 4846ff0 commit fa6be67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion test/factories/patient_assignment_factory.rb
Expand Up @@ -2,6 +2,5 @@
factory :patient_assignment do
patient
treatment_area
checked_out_at { Date.today }
end
end
8 changes: 5 additions & 3 deletions test/unit/patient_assignment_test.rb
Expand Up @@ -2,9 +2,11 @@

class PatientAssignmentTest < ActiveSupport::TestCase

def test_factory_should_build_valid_assignment
a = Factory.build(:patient_assignment)
assert a.valid?
def test_should_return_not_checked_out_entries
a1 = Factory(:patient_assignment)
a2 = Factory(:patient_assignment, checked_out_at: Time.now)

assert_equal [a1], PatientAssignment.not_checked_out
end

end

0 comments on commit fa6be67

Please sign in to comment.