mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Don't blow up if Redis switches to READONLY
This commit is contained in:
@ -10,7 +10,7 @@ describe ::DiscoursePoll::PollsController do
|
||||
describe "#vote" do
|
||||
|
||||
it "works" do
|
||||
MessageBus.expects(:publish)
|
||||
DiscourseBus.expects(:publish)
|
||||
|
||||
xhr :put, :vote, { post_id: poll.id, poll_name: "poll", options: ["A"] }
|
||||
|
||||
@ -76,7 +76,7 @@ describe ::DiscoursePoll::PollsController do
|
||||
describe "#toggle_status" do
|
||||
|
||||
it "works for OP" do
|
||||
MessageBus.expects(:publish)
|
||||
DiscourseBus.expects(:publish)
|
||||
|
||||
xhr :put, :toggle_status, { post_id: poll.id, poll_name: "poll", status: "closed" }
|
||||
expect(response).to be_success
|
||||
@ -86,7 +86,7 @@ describe ::DiscoursePoll::PollsController do
|
||||
|
||||
it "works for staff" do
|
||||
log_in(:moderator)
|
||||
MessageBus.expects(:publish)
|
||||
DiscourseBus.expects(:publish)
|
||||
|
||||
xhr :put, :toggle_status, { post_id: poll.id, poll_name: "poll", status: "closed" }
|
||||
expect(response).to be_success
|
||||
|
Reference in New Issue
Block a user