feat(assessment): keep real attempts in fullscreen and protect the task text
This commit is contained in:
1 parent
56dcf32f8c
commit
efa41d5967
46 files changed
+1940
-72
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package assessment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func TestAcknowledgeSignalNoticeRefusesEveryVersionButTheCurrentOne(t *testing.T) {
|
||||
// A refused version returns before the service touches storage, so an
|
||||
// acknowledgement of an earlier notice text can never count for this one.
|
||||
service := &SignalService{}
|
||||
for _, version := range []int32{CurrentSignalNoticeVersion - 1, CurrentSignalNoticeVersion + 1} {
|
||||
_, err := service.AcknowledgeSignalNotice(context.Background(), uuid.New(), version)
|
||||
if !errors.Is(err, ErrSignalNoticeVersionMismatch) {
|
||||
t.Fatalf("AcknowledgeSignalNotice(version %d) error = %v, want %v", version, err, ErrSignalNoticeVersionMismatch)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user