1package git23import (4 "context"5 "testing"67 "github.com/stretchr/testify/assert"8 "github.com/stretchr/testify/require"9)1011func TestRepository_CatFileBlob(t *testing.T) {12 ctx := context.Background()1314 t.Run("not a blob", func(t *testing.T) {15 _, err := testrepo.CatFileBlob(ctx, testrepoMarks[47].String())16 assert.Equal(t, ErrNotBlob, err)17 })1819 t.Run("get a blob, no full rev hash", func(t *testing.T) {20 b, err := testrepo.CatFileBlob(ctx, testrepoMarks[34].String()[:4])21 require.NoError(t, err)22 assert.True(t, b.IsBlob())23 })2425 t.Run("get a blob", func(t *testing.T) {26 b, err := testrepo.CatFileBlob(ctx, testrepoMarks[34].String())27 require.NoError(t, err)28 assert.True(t, b.IsBlob())29 })30}