fix jsxc_helper_spec and use new url_to in jsxc_helper

This commit is contained in:
Benjamin Neff 2015-07-11 03:14:12 +02:00
parent 1bf328d294
commit 0ffe513b40
2 changed files with 2 additions and 2 deletions

View file

@ -3,11 +3,10 @@ module JsxcHelper
port = AppConfig.chat.server.bosh.port
bind = AppConfig.chat.server.bosh.bind
host = AppConfig.pod_uri.host
scheme = AppConfig.pod_uri.scheme
unless AppConfig.chat.server.bosh.proxy?
return "http://#{host}:#{port}#{bind}"
end
return "#{scheme}://#{host}#{bind}"
AppConfig.url_to bind
end
end

View file

@ -6,6 +6,7 @@ describe JsxcHelper, :type => :helper do
AppConfig.chat.server.bosh.port = 1234
AppConfig.chat.server.bosh.bind = '/bind'
AppConfig.environment.url = "https://localhost/"
AppConfig.instance_variable_set(:@pod_uri, nil)
end
describe "#get_bosh_endpoint" do