2021-04-09 00:25:57 +02:00
|
|
|
// Copyright 2021 The Gitea Authors. All rights reserved.
|
2022-11-27 13:20:29 -05:00
|
|
|
// SPDX-License-Identifier: MIT
|
2021-04-09 00:25:57 +02:00
|
|
|
|
|
|
|
|
package lfs
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/url"
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestNewClient(t *testing.T) {
|
|
|
|
|
u, _ := url.Parse("file:///test")
|
2021-11-20 17:34:05 +08:00
|
|
|
c := NewClient(u, nil)
|
2021-04-09 00:25:57 +02:00
|
|
|
assert.IsType(t, &FilesystemClient{}, c)
|
|
|
|
|
|
|
|
|
|
u, _ = url.Parse("https://test.com/lfs")
|
2021-11-20 17:34:05 +08:00
|
|
|
c = NewClient(u, nil)
|
2021-04-09 00:25:57 +02:00
|
|
|
assert.IsType(t, &HTTPClient{}, c)
|
|
|
|
|
}
|