Added a Rate#locked? check. #1919
This commit is contained in:
1 parent
931ecae4d1
commit
9b0332bf78
2 files changed
+16
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user