зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-07 03:25:49 +03:00
Update rubopcop (#227)
* Update rubopcop [WIP] * Further rubocop fixes * Fix rubocop-rails cops * Fix spec * Disable rubocop suggestions * Run rubocop in github actions rather than in codeclimate
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7bcb0caded
Коммит
57b17f068c
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe Telegram::Bot::UpdatesController::Commands do
|
||||
describe '#action_for_command' do
|
||||
subject { ->(*args) { object.action_for_command(*args) } }
|
||||
@@ -88,11 +90,11 @@ RSpec.describe Telegram::Bot::UpdatesController::Commands do
|
||||
context 'with command' do
|
||||
let(:text) { "/test#{"@#{mention}" if mention} arg 1 2" }
|
||||
let(:mention) {}
|
||||
it { should eq [['test!', type: :command, command: 'test'], %w[arg 1 2]] }
|
||||
it { should eq [['test!', {type: :command, command: 'test'}], %w[arg 1 2]] }
|
||||
|
||||
context 'with mention' do
|
||||
let(:mention) { bot.username }
|
||||
it { should eq [['test!', type: :command, command: 'test'], %w[arg 1 2]] }
|
||||
it { should eq [['test!', {type: :command, command: 'test'}], %w[arg 1 2]] }
|
||||
end
|
||||
|
||||
context 'with mention for other bot' do
|
||||
|
||||
Ссылка в новой задаче
Block a user