discourse/spec/javascripts/message_bus_spec.js.coffee
Sam Saffron 161420fac0 Added method for testing ember stuff
Collapse user actions in UI so it stops looking crazy
Removed dud dupe user action TOPIC_RESPONSE
Always show the owner of a post on the user page, actions by others at the bottom
2013-02-13 20:38:43 +11:00

24 lines
800 B
CoffeeScript

describe "Discourse.MessageBus", ->
describe "Long polling", ->
bus = Discourse.MessageBus
bus.start()
# PENDING: Fix to allow these to run in jasmine-guard
#it "is able to get a response from the echo server", ->
# response = null
# bus.send("/echo", "hello world", (r) -> response = r)
# # give it some time to spin up
# waitsFor((-> response == "hello world"),"gotEcho",500)
#it "should get responses from broadcast channel", ->
# response = null
# # note /message_bus/broadcast is dev only
# bus.subscribe("/animals", (r) -> response = r)
# $.ajax
# url: '/message-bus/broadcast'
# data: {channel: "/animals", data: "kitten"}
# cache: false
# waitsFor((-> response == "kitten"),"gotBroadcast", 500)