19 lines
464 B
Go
19 lines
464 B
Go
package backendapp
|
|
|
|
import (
|
|
"testing"
|
|
|
|
userdto "github.com/kandev/kandev/internal/user/dto"
|
|
)
|
|
|
|
func TestMapUserSettingsStateIncludesArchiveConfirmation(t *testing.T) {
|
|
state := mapUserSettingsState(userdto.UserSettingsResponse{
|
|
Settings: userdto.UserSettingsDTO{ConfirmTaskArchive: true},
|
|
}, "workspace-1")
|
|
|
|
got, ok := state["confirmTaskArchive"].(bool)
|
|
if !ok || !got {
|
|
t.Fatalf("confirmTaskArchive = %#v, want true", state["confirmTaskArchive"])
|
|
}
|
|
}
|