Sha256: 8802fd5a01263b928ce3d2329f4d7dddd6f95ba14698410d88b053c6d0bdb09c

Contents?: true

Size: 693 Bytes

Versions: 8

Compression:

Stored size: 693 Bytes

Contents

# encoding: binary
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'Masking frame draft 07' do
  it 'encodes and decode masked frame correctly' do
    outgoing_frame = WebSocket::Frame::Outgoing::Client.new(data: 'Hello World', type: 'text')
    outgoing_frame.to_s
    expect(outgoing_frame.error).to be_nil
    incoming_frame = WebSocket::Frame::Incoming::Server.new(data: outgoing_frame.to_s).next
    expect(incoming_frame).not_to be_nil
    expect(incoming_frame.class).to eql(WebSocket::Frame::Incoming::Server)
    expect(incoming_frame.error).to be_nil
    expect(incoming_frame.decoded?).to be true
    expect(incoming_frame.to_s).to eql('Hello World')
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/websocket-1.2.10/spec/frame/masking_spec.rb
websocket-1.2.11 spec/frame/masking_spec.rb
websocket-1.2.10 spec/frame/masking_spec.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/websocket-1.2.9/spec/frame/masking_spec.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/websocket-1.2.9/spec/frame/masking_spec.rb
websocket-1.2.9 spec/frame/masking_spec.rb
websocket-1.2.8 spec/frame/masking_spec.rb
websocket-1.2.7 spec/frame/masking_spec.rb