Search: Update number of expected results in filter tests #2040

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-10-06 02:34:21 +02:00
parent 604849e92c
commit 9b3efe6872
8 changed files with 35 additions and 35 deletions

View file

@ -19,7 +19,7 @@ func TestPhotosFilterAlbum(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet*", func(t *testing.T) {
var f form.SearchPhotos
@ -289,7 +289,7 @@ func TestPhotosQueryAlbum(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet*", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -20,7 +20,7 @@ func TestPhotosFilterAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet*", func(t *testing.T) {
var f form.SearchPhotos
@ -46,7 +46,7 @@ func TestPhotosFilterAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* whitespace pipe whitespace Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -59,7 +59,7 @@ func TestPhotosFilterAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* or Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -72,7 +72,7 @@ func TestPhotosFilterAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* OR Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -85,7 +85,7 @@ func TestPhotosFilterAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* Ampersand Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -473,7 +473,7 @@ func TestPhotosQueryAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet*", func(t *testing.T) {
var f form.SearchPhotos
@ -499,7 +499,7 @@ func TestPhotosQueryAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* whitespace pipe whitespace Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -512,7 +512,7 @@ func TestPhotosQueryAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* or Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -525,7 +525,7 @@ func TestPhotosQueryAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* OR Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos
@ -538,7 +538,7 @@ func TestPhotosQueryAlbums(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 3)
assert.Equal(t, len(photos), 4)
})
t.Run("Pet* Ampersand Berlin 2019", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -20,7 +20,7 @@ func TestPhotosFilterCountry(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 6)
assert.Equal(t, len(photos), 7)
})
t.Run("mx", func(t *testing.T) {
var f form.SearchPhotos
@ -312,7 +312,7 @@ func TestPhotosQueryCountry(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 6)
assert.Equal(t, len(photos), 7)
})
t.Run("mx", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -23,7 +23,7 @@ func TestPhotosQueryFavorite(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos0), 5)
assert.Equal(t, len(photos0), 6)
t.Run("false > yes", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -32,7 +32,7 @@ func TestPhotosFilterFolder(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
assert.Equal(t, len(photos), 2)
})
t.Run("London", func(t *testing.T) {
var f form.SearchPhotos
@ -484,7 +484,7 @@ func TestPhotosQueryFolder(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
assert.Equal(t, len(photos), 2)
})
t.Run("London", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -32,7 +32,7 @@ func TestPhotosFilterKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 4)
assert.Equal(t, len(photos), 5)
})
t.Run("b* pipe kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -45,7 +45,7 @@ func TestPhotosFilterKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* whitespace pipe whitespace kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -58,7 +58,7 @@ func TestPhotosFilterKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* or kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -71,7 +71,7 @@ func TestPhotosFilterKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* OR kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -84,7 +84,7 @@ func TestPhotosFilterKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* Ampersand kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -535,7 +535,7 @@ func TestPhotosQueryKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 4)
assert.Equal(t, len(photos), 5)
})
t.Run("b* pipe kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -548,7 +548,7 @@ func TestPhotosQueryKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* whitespace pipe whitespace kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -561,7 +561,7 @@ func TestPhotosQueryKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* or kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -574,7 +574,7 @@ func TestPhotosQueryKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* OR kuh", func(t *testing.T) {
var f form.SearchPhotos
@ -587,7 +587,7 @@ func TestPhotosQueryKeywords(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 5)
assert.Equal(t, len(photos), 6)
})
t.Run("b* Ampersand kuh", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -32,7 +32,7 @@ func TestPhotosFilterPath(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
assert.Equal(t, len(photos), 2)
})
t.Run("London", func(t *testing.T) {
var f form.SearchPhotos
@ -471,7 +471,7 @@ func TestPhotosQueryPath(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
assert.Equal(t, len(photos), 2)
})
t.Run("London", func(t *testing.T) {
var f form.SearchPhotos

View file

@ -33,7 +33,7 @@ func TestPhotosFilterType(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
assert.Equal(t, len(photos), 2)
})
t.Run("animated", func(t *testing.T) {
var f form.SearchPhotos
@ -59,7 +59,7 @@ func TestPhotosFilterType(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 4)
assert.Equal(t, len(photos), 5)
})
t.Run("raw whitespace pipe whitespace video", func(t *testing.T) {
var f form.SearchPhotos
@ -72,7 +72,7 @@ func TestPhotosFilterType(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 4)
assert.Equal(t, len(photos), 5)
})
t.Run("raw or video", func(t *testing.T) {
var f form.SearchPhotos
@ -364,7 +364,7 @@ func TestPhotosQueryType(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 1)
assert.Equal(t, len(photos), 2)
})
t.Run("animated", func(t *testing.T) {
var f form.SearchPhotos
@ -390,7 +390,7 @@ func TestPhotosQueryType(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 4)
assert.Equal(t, len(photos), 5)
})
t.Run("raw whitespace pipe whitespace video", func(t *testing.T) {
var f form.SearchPhotos
@ -403,7 +403,7 @@ func TestPhotosQueryType(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assert.Equal(t, len(photos), 4)
assert.Equal(t, len(photos), 5)
})
t.Run("raw or video", func(t *testing.T) {
var f form.SearchPhotos