1
0
Fork 0

Add action TelegramBotUpdatesController#create

This commit is contained in:
Alex Kotov 2018-11-29 18:07:20 +05:00
parent bc5ada2f63
commit 59f205cf3e
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
3 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# frozen_string_literal: true
class TelegramBotUpdatesController < ApplicationController
# POST /telegram_bot_updates
def create
logger.info params.inspect
render status: :no_content, json: {}
end
end

View File

@ -20,4 +20,6 @@ Rails.application.routes.draw do
to: 'home#post2'
resources :membership_applications, only: %i[new create]
resources :telegram_bot_updates, only: :create
end

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'POST /telegram_bot_updates' do
before do
post '/telegram_bot_updates'
end
specify do
expect(response).to have_http_status :no_content
end
end