mirror of
				https://github.com/photoprism/photoprism.git
				synced 2025-10-31 20:22:55 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			403 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			403 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package api
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| 
 | |
| 	"github.com/stretchr/testify/assert"
 | |
| )
 | |
| 
 | |
| func TestSendFeedback(t *testing.T) {
 | |
| 	t.Run("not available in public mode", func(t *testing.T) {
 | |
| 		app, router, _ := NewApiTest()
 | |
| 		SendFeedback(router)
 | |
| 		r := PerformRequestWithBody(app, "POST", "/api/v1/feedback", `{"Subject": "Send feedback from unit test", "Message": "Test message"}`)
 | |
| 		assert.Equal(t, 403, r.Code)
 | |
| 	})
 | |
| }
 | 
