mirror of
https://github.com/photoprism/photoprism.git
synced 2025-09-26 21:01:58 +08:00
17 lines
294 B
Go
17 lines
294 B
Go
package api
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewResponse(t *testing.T) {
|
|
t.Run("404", func(t *testing.T) {
|
|
r := NewResponse(404, errors.New("not found"), "details")
|
|
assert.Equal(t, 404, r.Code)
|
|
assert.Equal(t, "details", r.Details)
|
|
})
|
|
}
|