Block blacklisted users on contact

This commit is contained in:
Jaiden Mispy 2014-11-18 14:31:59 +11:00
parent 2e336fb9be
commit 24e8ce5ae3
2 changed files with 17 additions and 9 deletions

View file

@ -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