fix gitea workflow path and runner label
Build docker and publish / build (20.15.1) (push) Failing after 7m54s
Build docker and publish / build (20.15.1) (push) Failing after 7m54s
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDeleteAccountResponseAlwaysContainsIntFields(t *testing.T) {
|
||||
data, err := json.Marshal(DeleteAccountResponse{
|
||||
Success: true,
|
||||
Message: "ok",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("failed to marshal response: %v", err)
|
||||
}
|
||||
|
||||
var decoded map[string]interface{}
|
||||
if err = json.Unmarshal(data, &decoded); err != nil {
|
||||
t.Fatalf("failed to decode response: %v", err)
|
||||
}
|
||||
|
||||
userID, hasUserID := decoded["user_id"]
|
||||
if !hasUserID {
|
||||
t.Fatalf("expected user_id in JSON, got %s", string(data))
|
||||
}
|
||||
if userID != float64(0) {
|
||||
t.Fatalf("expected user_id=0, got %v", userID)
|
||||
}
|
||||
|
||||
code, hasCode := decoded["code"]
|
||||
if !hasCode {
|
||||
t.Fatalf("expected code in JSON, got %s", string(data))
|
||||
}
|
||||
if code != float64(0) {
|
||||
t.Fatalf("expected code=0, got %v", code)
|
||||
}
|
||||
}
|
||||
@@ -2968,8 +2968,8 @@ type GetSubscribeStatusRequest struct {
|
||||
type DeleteAccountResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message,omitempty"`
|
||||
UserId int64 `json:"user_id,omitempty"`
|
||||
Code int `json:"code,omitempty"`
|
||||
UserId int64 `json:"user_id"`
|
||||
Code int `json:"code"`
|
||||
}
|
||||
|
||||
type GetDownloadLinkRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user