Live update poll votes.

This commit is contained in:
Vikhyat Korrapati
2014-03-24 09:35:39 +05:30
parent a3344a6be3
commit ff43aac603
2 changed files with 11 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ describe PollPlugin::PollController, type: :controller do
end
it "should save votes correctly" do
MessageBus.expects(:publish).times(4)
log_in_user user1
xhr :put, :vote, post_id: post.id, option: "Chitoge", use_route: :poll
PollPlugin::Poll.new(post).get_vote(user1).should eq("Chitoge")