feat: Update instagram webhooks URL (#3197)

This commit is contained in:
Tejaswini Chile
2021-10-12 12:46:27 +05:30
committed by GitHub
parent c1d68cc8ae
commit 5749d25ff8
3 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
require 'rails_helper'
RSpec.describe 'Webhooks::InstagramController', type: :request do
describe 'POST /webhooks/instagram' do
let!(:dm_params) { build(:instagram_message_create_event).with_indifferent_access }
it 'call the instagram events job with the params' do
allow(::Webhooks::InstagramEventsJob).to receive(:perform_later)
expect(::Webhooks::InstagramEventsJob).to receive(:perform_later)
instagram_params = dm_params.merge(object: 'instagram')
post '/webhooks/instagram', params: instagram_params
expect(response).to have_http_status(:success)
end
end
end