You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

client_test.go 489B

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