Added a Rate#locked? check. #1919

This commit is contained in:
Eric Davis committed 2009-01-16 15:23:30 -08:00
1 parent 931ecae4d1
commit 9b0332bf78
2 files changed
+16

No files matched your search

+13
View File
@@ -57,3 +57,16 @@ describe Rate, 'associations' do
end
describe Rate, 'locked?' do
it 'should be true if a Time Entry is associated' do
rate = Rate.new
rate.time_entries << mock_model(TimeEntry)
rate.locked?.should be_true
end
it 'should be false if no Time Entries are associated' do
rate = Rate.new
rate.locked?.should be_false
end
end