mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 00:01:20 -04:00 
			
		
		
		
	1. Ignore empty inputs in `UnmarshalHandleDoubleEncode` 2. Ignore non-existing `stateEvent.User` in gitlab migration 3. Enable `release` and `wiki` units when they are selected in migration 4. Sanitize repo name for migration and new repo
		
			
				
	
	
		
			19 lines
		
	
	
		
			378 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			378 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2025 The Gitea Authors. All rights reserved.
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| package json
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| 
 | |
| 	"github.com/stretchr/testify/assert"
 | |
| )
 | |
| 
 | |
| func TestGiteaDBJSONUnmarshal(t *testing.T) {
 | |
| 	var m map[any]any
 | |
| 	err := UnmarshalHandleDoubleEncode(nil, &m)
 | |
| 	assert.NoError(t, err)
 | |
| 	err = UnmarshalHandleDoubleEncode([]byte(""), &m)
 | |
| 	assert.NoError(t, err)
 | |
| }
 |