feat: upload audio, get a private Swedish transcript, discuss it (#33, ADR-033) #39
@@ -78,3 +78,15 @@ func TestWorkerSubmit_AJobThatHasLeftTheQueueFreesItsPlace(t *testing.T) {
|
|||||||
|
|
||||||
assert.NoError(t, w.Submit(r.spool(t, "second")), "the cap counts jobs waiting, not jobs ever submitted")
|
assert.NoError(t, w.Submit(r.spool(t, "second")), "the cap counts jobs waiting, not jobs ever submitted")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestWorkerHasRoom_SaysWhetherASubmitWouldBeAccepted(t *testing.T) {
|
||||||
|
w := queueWorker(t, 3, 2)
|
||||||
|
assert.True(t, w.HasRoom("alice"))
|
||||||
|
require.NoError(t, submit(w, "alice", 1))
|
||||||
|
require.NoError(t, submit(w, "alice", 2))
|
||||||
|
|
||||||
|
assert.False(t, w.HasRoom("alice"), "alice is at her share")
|
||||||
|
assert.True(t, w.HasRoom("bob"), "bob is not")
|
||||||
|
require.NoError(t, submit(w, "bob", 1))
|
||||||
|
assert.False(t, w.HasRoom("carol"), "the queue as a whole is at its cap")
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user