github.com/gitbundle/modules@v0.0.0-20231025071548-85b91c5c3b01/lfs/client_test.go (about)

     1  // Copyright 2023 The GitBundle Inc. All rights reserved.
     2  // Copyright 2017 The Gitea Authors. All rights reserved.
     3  // Use of this source code is governed by a MIT-style
     4  // license that can be found in the LICENSE file.
     5  
     6  package lfs
     7  
     8  import (
     9  	"net/url"
    10  	"testing"
    11  
    12  	"github.com/stretchr/testify/assert"
    13  )
    14  
    15  func TestNewClient(t *testing.T) {
    16  	u, _ := url.Parse("file:///test")
    17  	c := NewClient(u, nil)
    18  	assert.IsType(t, &FilesystemClient{}, c)
    19  
    20  	u, _ = url.Parse("https://test.com/lfs")
    21  	c = NewClient(u, nil)
    22  	assert.IsType(t, &HTTPClient{}, c)
    23  }