Remove SlackBotPingJob and spec (#5655)

This commit is contained in:
Alex 2020-01-22 12:17:52 -08:00 committed by Mac Siri
parent 33d6dca565
commit 75be0d3d23
2 changed files with 0 additions and 26 deletions

View file

@ -1,7 +0,0 @@
class SlackBotPingJob < ApplicationJob
queue_as :slack_bot_ping
def perform(message:, channel:, username:, icon_emoji:)
SlackBot.ping(message, channel: channel, username: username, icon_emoji: icon_emoji)
end
end

View file

@ -1,19 +0,0 @@
require "rails_helper"
RSpec.describe SlackBotPingJob, type: :job do
describe "#perform_now" do
before do
allow(SlackBot).to receive(:ping)
end
it "calls the SlackBot" do
described_class.perform_now(message: "hello",
channel: "#help",
username: "sloan_watch_bot",
icon_emoji: ":sloan:")
expect(SlackBot).to have_received(:ping).with("hello", channel: "#help",
username: "sloan_watch_bot",
icon_emoji: ":sloan:")
end
end
end