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 417B

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