feat: Update Swagger for the custom filter endpoint (#3367)

This commit is contained in:
Tejaswini Chile
2021-11-12 19:28:03 +05:30
committed by GitHub
parent cf5f6d5a74
commit 37a36349f2
5 changed files with 137 additions and 3 deletions

View File

@@ -51,6 +51,14 @@ describe ::Conversations::FilterService do
expect(result.length).to be conversations.count
end
it 'filter conversations by custom_attributes and status with pagination' do
params[:payload] = payload
params[:page] = 2
result = filter_service.new(params, user_1).perform
conversations = Conversation.where("additional_attributes ->> 'browser_language' IN (?) AND status IN (?)", ['en'], [1, 2])
expect(result.length).to be conversations.count
end
it 'filter conversations by tags' do
Conversation.last.update_labels('support')
params[:payload] = [