github.com/creativeprojects/go-selfupdate@v1.2.0/repository_id_test.go (about)

     1  package selfupdate
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestRepositoryID(t *testing.T) {
    10  	id := NewRepositoryID(11)
    11  
    12  	repo, err := id.Get()
    13  	assert.NoError(t, err)
    14  	assert.Equal(t, 11, repo)
    15  
    16  	_, _, err = id.GetSlug()
    17  	assert.Error(t, err)
    18  }