Sha256: 1e8837f01e2ac8c92794df90f8e930914638285b3a613b475de6a50f5115e492

Contents?: true

Size: 901 Bytes

Versions: 6

Compression:

Stored size: 901 Bytes

Contents

require "opentok/opentok"
require "opentok/websocket"
require "opentok/version"
require "spec_helper"

describe OpenTok::WebSocket do
  before(:each) do
    now = Time.parse("2017-04-18 20:17:40 +1000")
    allow(Time).to receive(:now) { now }
  end

  let(:api_key) { "123456" }
  let(:api_secret) { "1234567890abcdef1234567890abcdef1234567890" }
  let(:session_id) { "SESSIONID" }
  let(:connection_id) { "CONNID" }
  let(:expiring_token) { "TOKENID" }
  let(:websocket_uri) { "ws://service.com/wsendpoint" }
  let(:opentok) { OpenTok::OpenTok.new api_key, api_secret }
  let(:websocket) { opentok.websocket }
  subject { websocket }

  it "receives a valid response", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
    response = websocket.connect(session_id, expiring_token, websocket_uri)
    expect(response).not_to be_nil
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opentok-4.9.0 spec/opentok/websocket_spec.rb
opentok-4.8.1 spec/opentok/websocket_spec.rb
opentok-4.8.0 spec/opentok/websocket_spec.rb
opentok-4.7.1 spec/opentok/websocket_spec.rb
opentok-4.7.0 spec/opentok/websocket_spec.rb
opentok-4.6.0 spec/opentok/websocket_spec.rb