Sha256: a7cd50107969d8d55308dceaf81c1e217156baf7b0dd61b930af47fd821587cb

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

require 'spec/helper'


describe "Testing FSR module loading methods" do
  # When you add applications  you must modify the expected apps_loaded behavior
  it "Loads all applications" do
    all_apps = [:play_and_get_digits, :uuid_dump, :uuid_setvar, :uuid_getvar, :read, :set, :transfer, :speak, :fs_sleep, :playback, :answer, :fifo, :bridge, :hangup, :conference, :fs_break, :log]
    # Add any apps which will load to this set
    apps_loaded = FSR.load_all_applications
    apps_loaded.kind_of?(Array).should == true
    all_apps.each do |app|
      apps_loaded.delete(app).should == app
    end
    apps_loaded.size.should == 0
  end

  # When you add commands  you must modify the expected cmds_loaded behavior
  it "Loads all commands" do
    all_commands = [:originate, :sofia, :fsctl, :sofia_contact, :status, :calls] # If you add a command add it to this set
    cmds_loaded = FSR.load_all_commands
    cmds_loaded.kind_of?(Array).should == true
    all_commands.each do |cmd|
      cmds_loaded.delete(cmd).should == cmd
    end
    cmds_loaded.size.should == 0
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bougyman-freeswitcher-0.1.0 spec/fsr/loading.rb
bougyman-freeswitcher-0.1.1 spec/fsr/loading.rb