Sha256: d6ca137ac13a3d29b6c9cf19c59e9fa83a5d83ac44440b73f48907c0f2be01b6

Contents?: true

Size: 1006 Bytes

Versions: 4

Compression:

Stored size: 1006 Bytes

Contents

require 'spec/helper'
require "fsr/cmd"
FSR::Cmd.load_command("channels")

describe "Testing FSR::Cmd::Channels" do
  ## Channels ##
  # Interface to channels
  it "FSR::Cmd::Channels (false as the filter) should send show channels" do
    sofia = FSR::Cmd::Channels.new(nil, false)
    sofia.raw.should == "show channels"
    sofia.instance_variable_get("@filter").should.be.nil
  end

  it "FSR::Cmd::Channels (true as the filter) should send show channels" do
    sofia = FSR::Cmd::Channels.new(nil, true)
    sofia.raw.should == "show distinct_channels"
    sofia.instance_variable_get("@filter").should === true
  end

  it "FSR::Cmd::Channels (string as the filter) should add the filter" do
    sofia = FSR::Cmd::Channels.new(nil, 'something')
    sofia.raw.should == "show channels like 'something'"
  end

  it "FSR::Cmd::Channels (number as the filter) should just limit the calls to that number" do
    sofia = FSR::Cmd::Channels.new(nil, 3)
    sofia.raw.should == "show channels 3"
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
freeswitcher-0.8.0 spec/fsr/cmd/channels.rb
freeswitcher-0.7.1 spec/fsr/cmd/channels.rb
freeswitcher-0.7.0 spec/fsr/cmd/channels.rb
freeswitcher-0.6.18 spec/fsr/cmd/channels.rb