mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-04 21:20:51 +08:00
16 lines
384 B
Go
16 lines
384 B
Go
package repository
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestAffiliateUserOverviewSQLIncludesMaturedFrozenQuota(t *testing.T) {
|
|
query := strings.Join(strings.Fields(affiliateUserOverviewSQL), " ")
|
|
|
|
require.Contains(t, query, "ua.aff_quota + COALESCE(matured.matured_frozen_quota, 0)")
|
|
require.Contains(t, query, "frozen_until <= NOW()")
|
|
}
|