chore: Add count and current page in notification meta details (#1619)

This commit is contained in:
Muhsin Keloth
2021-01-13 03:34:27 -08:00
committed by GitHub
parent 8c66dbd342
commit 2d5aa9d3bd
3 changed files with 14 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ RSpec.describe 'Notifications API', type: :request do
expect(response).to have_http_status(:success)
expect(response.body).to include(notification1.notification_type)
expect(response_json['data']['meta']['unread_count']).to eq 2
expect(response_json['data']['meta']['count']).to eq 2
# notification appear in descending order
expect(response_json['data']['payload'].first['id']).to eq notification2.id
end