bumbleworks 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bumbleworks/task.rb +1 -0
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/lib/bumbleworks/task_spec.rb +9 -0
- metadata +1 -1
data/lib/bumbleworks/task.rb
CHANGED
data/lib/bumbleworks/version.rb
CHANGED
@@ -279,6 +279,10 @@ describe Bumbleworks::Task do
|
|
279
279
|
@task.params['claimant'].should == 'boss'
|
280
280
|
end
|
281
281
|
|
282
|
+
it 'sets claimed_at param' do
|
283
|
+
@task.params['claimed_at'].should_not be_nil
|
284
|
+
end
|
285
|
+
|
282
286
|
it 'raises an error if already claimed by someone else' do
|
283
287
|
expect{@task.claim('peon')}.to raise_error described_class::AlreadyClaimed
|
284
288
|
end
|
@@ -318,6 +322,11 @@ describe Bumbleworks::Task do
|
|
318
322
|
@task.should_not be_claimed
|
319
323
|
end
|
320
324
|
|
325
|
+
it 'clears claimed_at param' do
|
326
|
+
@task.release
|
327
|
+
@task.params['claimed_at'].should be_nil
|
328
|
+
end
|
329
|
+
|
321
330
|
it 'logs event' do
|
322
331
|
@task.release
|
323
332
|
log_entry = Bumbleworks.logger.entries.last[:entry]
|