67 lines
1.5 KiB
Go
67 lines
1.5 KiB
Go
package service
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
// === Conversation Finder Strategy tests ===
|
|
|
|
func TestNewBaseStrategy_Cov19b(t *testing.T) {
|
|
s := NewBaseStrategy(FilterParams{}, 1, 1, true)
|
|
assert.Equal(t, uint(1), s.CurrentUserID)
|
|
assert.Equal(t, uint(1), s.AccountID)
|
|
assert.True(t, s.IsAdmin)
|
|
}
|
|
|
|
func TestStatusFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &StatusFilterStrategy{}
|
|
assert.Equal(t, "status", s.Name())
|
|
}
|
|
|
|
func TestAssigneeTypeFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &AssigneeTypeFilterStrategy{}
|
|
assert.Equal(t, "assignee_type", s.Name())
|
|
}
|
|
|
|
func TestSortByFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &SortByFilterStrategy{}
|
|
assert.Equal(t, "sort_by", s.Name())
|
|
}
|
|
|
|
func TestLabelsFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &LabelsFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|
|
|
|
func TestTeamFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &TeamFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|
|
|
|
func TestInboxIDsFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &InboxIDsFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|
|
|
|
func TestTagsFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &TagsFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|
|
|
|
func TestConversationTypeFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &ConversationTypeFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|
|
|
|
func TestUpdatedWithinFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &UpdatedWithinFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|
|
|
|
func TestPriorityFilterStrategy_Name_Cov19b(t *testing.T) {
|
|
s := &PriorityFilterStrategy{}
|
|
_ = s.Name()
|
|
}
|