Skip to content

Commit

Permalink
Remove tests for deleted code
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg committed May 18, 2023
1 parent accd8b6 commit 1c13b2d
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions search/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,58 +41,6 @@ func TestTag(t *testing.T) {
}
}

func TestWhereEmpty(t *testing.T) {
query, err := Parse("")
if err != nil {
t.Error(err)
}
actual := query.Where("tag", "name")
expected := Where{
SQL: "",
Texts: nil,
}
assert.Equal(t, expected, actual)
}

func TestWhereTag(t *testing.T) {
query, err := Parse("tag:hello")
if err != nil {
t.Error(err)
}
actual := query.Where("tag", "name")
expected := Where{
SQL: "name = ?",
Texts: []string{"hello"},
}
assert.Equal(t, expected, actual)
}

func TestWhereTags(t *testing.T) {
query, err := Parse("tag:hello tag:world")
if err != nil {
t.Error(err)
}
actual := query.Where("tag", "name")
expected := Where{
SQL: "name = ? AND name = ?",
Texts: []string{"hello", "world"},
}
assert.Equal(t, expected, actual)
}

func TestWhereExifTag(t *testing.T) {
query, err := Parse("tag:exif:model:dji-osmo-action")
if err != nil {
t.Error(err)
}
actual := query.Where("tag", "name")
expected := Where{
SQL: "name = ?",
Texts: []string{"exif:model:dji-osmo-action"},
}
assert.Equal(t, expected, actual)
}

func TestQualifierValues(t *testing.T) {
query, err := Parse("tag:hello word tag:world hi:there")
if err != nil {
Expand Down

0 comments on commit 1c13b2d

Please sign in to comment.