Imported Upstream version 2.4.2
[scm/test.git] / git / odb / errors_test.go
1 package odb
2
3 import (
4         "testing"
5
6         "github.com/stretchr/testify/assert"
7 )
8
9 func TestUnexpectedObjectTypeErrFormatting(t *testing.T) {
10         err := &UnexpectedObjectType{
11                 Got: TreeObjectType, Wanted: BlobObjectType,
12         }
13
14         assert.Equal(t, "git/odb: unexpected object type, got: \"tree\", wanted: \"blob\"", err.Error())
15 }