Tests: Update photo fixtures

This commit is contained in:
theresa 2022-04-22 10:48:07 +02:00
parent 16c2db9872
commit 0c345d4426
2 changed files with 5 additions and 35 deletions

View file

@ -340,7 +340,7 @@ var PhotoFixtures = PhotoMap{
DeletedAt: nil,
PhotoColor: 12,
PhotoStack: 0,
PhotoFaces: 6,
PhotoFaces: 3,
},
"Photo05": { //JPG, Imported, File error, TakenAtSrc Name, titleSrc Name
ID: 1000005,
@ -399,7 +399,7 @@ var PhotoFixtures = PhotoMap{
DeletedAt: nil,
PhotoColor: 6,
PhotoStack: 0,
PhotoFaces: 1,
PhotoFaces: 2,
},
"Photo06": { // PNG + JPG, Private, Indexed
ID: 1000006,

View file

@ -55,7 +55,7 @@ func TestPhotosFilterFaces(t *testing.T) {
t.Run("5", func(t *testing.T) {
var f form.SearchPhotos
f.Faces = "5"
f.Faces = "4"
f.Primary = true
photos, _, err := Photos(f)
@ -63,23 +63,8 @@ func TestPhotosFilterFaces(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
})
//Should not find one --> some markers have type label
/*t.Run("6", func(t *testing.T) {
var f form.SearchPhotos
f.Faces = "6"
f.Primary = true
photos, _, err := Photos(f)
if err != nil {
t.Fatal(err)
}
t.Log(photos[0].PhotoUID)
assert.Equal(t, len(photos), 0)
})*/
})
t.Run("StartsWithPercent", func(t *testing.T) {
var f form.SearchPhotos
@ -383,23 +368,8 @@ func TestPhotosQueryFaces(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
})
//Should not find one --> some markers have type label
/*t.Run("6", func(t *testing.T) {
var f form.SearchPhotos
f.Query = "faces:6"
f.Primary = true
photos, _, err := Photos(f)
if err != nil {
t.Fatal(err)
}
t.Log(photos[0].PhotoUID)
assert.Equal(t, len(photos), 0)
})*/
})
t.Run("StartsWithPercent", func(t *testing.T) {
var f form.SearchPhotos