Feature: API to get most used labels (#447)
* Add most-used labels API * Filter conversation by labels * Move match_all to any query Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
@@ -36,6 +36,18 @@ describe ::ConversationFinder do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with labels' do
|
||||
let(:params) { { labels: ['resolved'] } }
|
||||
|
||||
it 'filter conversations by labels' do
|
||||
conversation = inbox.conversations.first
|
||||
conversation.update_labels('resolved')
|
||||
|
||||
result = conversation_finder.perform
|
||||
expect(result[:conversations].count).to be 1
|
||||
end
|
||||
end
|
||||
|
||||
context 'with pagination' do
|
||||
let(:params) { { status: 'open', assignee_type_id: 0, page: 1 } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user