Revert "chore: Specs for Whatsapp template pagination (#6870)"

This reverts commit d49989ace1.
This commit is contained in:
Shivam Mishra
2023-04-11 11:06:24 +05:30
parent 17ff1f11a7
commit 2a8c547aeb
@@ -112,20 +112,9 @@ describe Whatsapp::Providers::WhatsappCloudService do
context 'when called' do
it 'updated the message templates' do
stub_request(:get, 'https://graph.facebook.com/v14.0/123456789/message_templates?access_token=test_key')
.to_return(
{ status: 200, headers: response_headers,
body: { data: [
{ id: '123456789', name: 'test_template' }
], paging: { next: 'https://graph.facebook.com/v14.0/123456789/message_templates?access_token=test_key' } }.to_json },
{ status: 200, headers: response_headers,
body: { data: [
{ id: '123456789', name: 'next_template' }
], paging: { prev: 'https://graph.facebook.com/v14.0/123456789/message_templates?access_token=test_key' } }.to_json }
)
.to_return(status: 200, headers: response_headers, body: { data: [{ id: '123456789', name: 'test_template' }] }.to_json)
expect(subject.sync_templates).to be(true)
expect(whatsapp_channel.reload.message_templates.first).to eq({ id: '123456789', name: 'test_template' }.stringify_keys)
expect(whatsapp_channel.reload.message_templates.last).to eq([{ id: '123456789', name: 'next_template' }.stringify_keys])
expect(whatsapp_channel.reload.message_templates).to eq([{ id: '123456789', name: 'test_template' }.stringify_keys])
end
end
end