mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Block blacklisted users on contact
This commit is contained in:
@@ -148,4 +148,12 @@ describe Ebooks::Bot do
|
||||
expect(bot.twitter).to_not have_received(:update)
|
||||
end
|
||||
end
|
||||
|
||||
it "blocks blacklisted users on contact" do
|
||||
simulate(bot) do
|
||||
bot.blacklist = ["spammer"]
|
||||
bot.receive_event(mock_tweet("spammer", "@test_ebooks @m1sp 7"))
|
||||
expect(bot.twitter).to have_received(:block).with("spammer")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user