mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:57:31 +00:00
refactor: cleanup unused code (#7130)
* refactor: drop unused code * refactor: drop unused code
This commit is contained in:
@@ -1018,95 +1018,6 @@ func TestTextQuery_comp(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestTextComparisonFromMethod(t *testing.T) {
|
||||
type args struct {
|
||||
m domain.SearchMethod
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want TextComparison
|
||||
}{
|
||||
{
|
||||
name: "equals",
|
||||
args: args{
|
||||
m: domain.SearchMethodEquals,
|
||||
},
|
||||
want: TextEquals,
|
||||
},
|
||||
{
|
||||
name: "equals ignore case",
|
||||
args: args{
|
||||
m: domain.SearchMethodEqualsIgnoreCase,
|
||||
},
|
||||
want: TextEqualsIgnoreCase,
|
||||
},
|
||||
{
|
||||
name: "starts with",
|
||||
args: args{
|
||||
m: domain.SearchMethodStartsWith,
|
||||
},
|
||||
want: TextStartsWith,
|
||||
},
|
||||
{
|
||||
name: "starts with ignore case",
|
||||
args: args{
|
||||
m: domain.SearchMethodStartsWithIgnoreCase,
|
||||
},
|
||||
want: TextStartsWithIgnoreCase,
|
||||
},
|
||||
{
|
||||
name: "ends with",
|
||||
args: args{
|
||||
m: domain.SearchMethodEndsWith,
|
||||
},
|
||||
want: TextEndsWith,
|
||||
},
|
||||
{
|
||||
name: "ends with ignore case",
|
||||
args: args{
|
||||
m: domain.SearchMethodEndsWithIgnoreCase,
|
||||
},
|
||||
want: TextEndsWithIgnoreCase,
|
||||
},
|
||||
{
|
||||
name: "contains",
|
||||
args: args{
|
||||
m: domain.SearchMethodContains,
|
||||
},
|
||||
want: TextContains,
|
||||
},
|
||||
{
|
||||
name: "list contains",
|
||||
args: args{
|
||||
m: domain.SearchMethodListContains,
|
||||
},
|
||||
want: TextListContains,
|
||||
},
|
||||
{
|
||||
name: "containts ignore case",
|
||||
args: args{
|
||||
m: domain.SearchMethodContainsIgnoreCase,
|
||||
},
|
||||
want: TextContainsIgnoreCase,
|
||||
},
|
||||
{
|
||||
name: "invalid search method",
|
||||
args: args{
|
||||
m: -1,
|
||||
},
|
||||
want: textCompareMax,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := TextComparisonFromMethod(tt.args.m); got != tt.want {
|
||||
t.Errorf("TextCompareFromMethod() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewNumberQuery(t *testing.T) {
|
||||
type args struct {
|
||||
column Column
|
||||
|
Reference in New Issue
Block a user