debian-mirror-gitlab/workhorse/internal/git/blob_test.go
2021-02-22 17:27:13 +05:30

17 lines
312 B
Go

package git
import (
"net/http/httptest"
"testing"
"github.com/stretchr/testify/require"
)
func TestSetBlobHeaders(t *testing.T) {
w := httptest.NewRecorder()
w.Header().Set("Set-Cookie", "gitlab_cookie=123456")
setBlobHeaders(w)
require.Empty(t, w.Header().Get("Set-Cookie"), "remove Set-Cookie")
}