feat: publish v1.0.0-rc.36-custom.1
This commit is contained in:
commit
3a7e8f3b54
2381 files changed
+551494
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/QuantumNous/new-api/setting/system_setting"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPaymentReturnPathUsesDefaultDashboardRoutes(t *testing.T) {
|
||||
previousAddress := system_setting.ServerAddress
|
||||
system_setting.ServerAddress = "https://dashboard.example.com/"
|
||||
t.Cleanup(func() { system_setting.ServerAddress = previousAddress })
|
||||
|
||||
assert.Equal(
|
||||
t,
|
||||
"https://dashboard.example.com/wallet?pay=success",
|
||||
paymentReturnPath("/wallet?pay=success"),
|
||||
)
|
||||
assert.Equal(
|
||||
t,
|
||||
"https://dashboard.example.com/usage-logs",
|
||||
paymentReturnPath("/usage-logs"),
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user