- Updated environment configuration to unify frontend for mail and drive under a single service. - Revised README to reflect changes in frontend setup and routing for the unified application. - Introduced new API documentation endpoints for better accessibility of API specifications. - Enhanced drive and mail services with improved handling of file uploads and metadata enrichment. - Implemented new API token management features, including creation, listing, and revocation of tokens. - Added tests for new functionalities in drive and mail services to ensure reliability and correctness.
20 lines
395 B
Go
20 lines
395 B
Go
package mail
|
|
|
|
import "testing"
|
|
|
|
func TestAppendMessageAccountScopeRestricted(t *testing.T) {
|
|
base, args, idx := appendMessageAccountScope(
|
|
" FROM messages m WHERE 1=1",
|
|
[]any{"user"},
|
|
2,
|
|
"",
|
|
[]string{"acc-1", "acc-2"},
|
|
)
|
|
if idx != 3 || len(args) != 2 {
|
|
t.Fatalf("idx=%d len(args)=%d", idx, len(args))
|
|
}
|
|
if base == "" || args[1] == nil {
|
|
t.Fatal("expected scoped clause")
|
|
}
|
|
}
|