code.gitea.io/gitea@v1.19.3/modules/lfs/client_test.go (about) 1 // Copyright 2021 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package lfs 5 6 import ( 7 "net/url" 8 "testing" 9 10 "github.com/stretchr/testify/assert" 11 ) 12 13 func TestNewClient(t *testing.T) { 14 u, _ := url.Parse("file:///test") 15 c := NewClient(u, nil) 16 assert.IsType(t, &FilesystemClient{}, c) 17 18 u, _ = url.Parse("https://test.com/lfs") 19 c = NewClient(u, nil) 20 assert.IsType(t, &HTTPClient{}, c) 21 }