Sha256: 21216a3abf0d98d40ddc9ec6652f644eac524d1ad6ebb01b90a39e9c370cab5d

Contents?: true

Size: 1.25 KB

Versions: 14

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Evostream::Action, type: :request do
  let(:action) { described_class.new(payload) }
  let(:payload) { {} }

  it 'is a hash' do
    expect(action.instance_variable_get(:@payload)).to be_kind_of(Hash)
  end

  describe 'when push_stream' do
    let(:action_name) { 'pushStream' }
    let(:payload) do
      {
        uri: 'rtmp://rtmp-api.facebook.com:80/rtmp',
        target_stream_name: '151146928743762?ds=1&s_l=1&a=AThF12FC86-ffgS5',
        local_stream_name: 'top'
      }
    end

    context 'with global Evostream variable' do
      include_examples 'test request action'
    end

    context 'with local Evostream variable' do
      let(:action) { described_class.new(payload, 'evostream.dazzl.local') }

      include_examples 'test request action'
    end
  end

  describe 'when remove_config' do
    let(:action_name) { 'removeConfig' }
    let(:payload) { { id: Faker::Number.between(from: 1, to: 999_999) } }

    context 'with global Evostream variable' do
      include_examples 'test request action'
    end

    context 'with local Evostream variable' do
      let(:action) { described_class.new(payload, 'evostream.dazzl.local') }

      include_examples 'test request action'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
evostream-event-2.0.3 spec/evostream/action_spec.rb
evostream-event-2.0.3.pre.1265906291 spec/evostream/action_spec.rb
evostream-event-2.0.3.pre.1265756691 spec/evostream/action_spec.rb
evostream-event-2.0.3.pre.1265752332 spec/evostream/action_spec.rb
evostream-event-2.0.2 spec/evostream/action_spec.rb
evostream-event-2.0.2.pre.994185738 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.994170151 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.994165179 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.994159616 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.856454391 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.856447460 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.856441003 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.816370746 spec/evostream/action_spec.rb
evostream-event-2.0.0.pre.809444619 spec/evostream/action_spec.rb