Sha256: b6beaebbb8fcba4f11af5068026cea2917cd619268c189b51212e4672e31de2f

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true

require 'pio/open_flow13/error/hello_failed'

describe Pio::OpenFlow13::Error::HelloFailed do
  it_should_behave_like('an OpenFlow message',
                        Pio::OpenFlow13::Error::HelloFailed)

  describe '.new' do
    When(:hello_failed) { Pio::OpenFlow13::Error::HelloFailed.new(options) }

    context 'with {}' do
      Given(:options) { {} }

      Then { hello_failed.length == 12 }
      Then { hello_failed.error_type == :hello_failed }
      Then { hello_failed.error_code == :incompatible }
      Then { hello_failed.description == '' }
    end

    context "with description: 'error description'" do
      Given(:options) { { description: 'error description' } }

      Then { hello_failed.length == 29 }
      Then { hello_failed.description == 'error description' }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pio-0.30.2 spec/pio/open_flow13/error/hello_failed_spec.rb