Skip to content

Commit

Permalink
Improve the test
Browse files Browse the repository at this point in the history
  • Loading branch information
canack committed Mar 10, 2024
1 parent a4ceacc commit 612644b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions internal/version/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package repository
import (
"context"
"testing"

"github.com/stretchr/testify/assert"
)

func NewRepository() Repository {
Expand All @@ -13,8 +15,9 @@ func TestRepo_LatestVersion(t *testing.T) {
ctx := context.Background()
repo := NewRepository()

_, err := repo.LatestVersion(ctx)
if err != nil {
t.Error(err)
}
t.Run("Get latest version", func(t *testing.T) {
res, err := repo.LatestVersion(ctx)
assert.NoError(t, err)
assert.NotEmpty(t, res)
})
}

0 comments on commit 612644b

Please sign in to comment.