debian-mirror-gitlab/workhorse/internal/git/blob_test.go

18 lines
312 B
Go
Raw Normal View History

2021-02-22 17:27:13 +05:30
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")
}