github.com/hoffie/larasync@v0.0.0-20151025221940-0384d2bddcef/api/client/client_test.go (about)

     1  package client
     2  
     3  import (
     4  	. "gopkg.in/check.v1"
     5  )
     6  
     7  type ClientTests struct {
     8  }
     9  
    10  var _ = Suite(&ClientTests{})
    11  
    12  func (t *ClientTests) TestClientCreation(c *C) {
    13  	client := New("http://localhost:6543/", "", func(_ string) bool {
    14  		return true
    15  	})
    16  	c.Assert(client, NotNil)
    17  }
    18  
    19  func (t *ClientTests) TestNetlocToUrl(c *C) {
    20  	testRepository := "https://example.org:80/repositories/testRepository"
    21  	c.Assert(NetlocToURL("example.org:80", "testRepository"), Equals, testRepository)
    22  }