diff --git a/spec/workers/question_worker_spec.rb b/spec/workers/question_worker_spec.rb index 94f45a50..c427058b 100644 --- a/spec/workers/question_worker_spec.rb +++ b/spec/workers/question_worker_spec.rb @@ -40,5 +40,16 @@ describe QuestionWorker do .to(4) ) end + + it "does not send questions to banned users" do + user.followers.first.ban + + expect { subject } + .to( + change { Inbox.where(user_id: user.followers.ids, question_id: question_id, new: true).count } + .from(0) + .to(4) + ) + end end end