Sha256: 8cd2b83ce9946d4008656a7f3eee2c8afbb3df8ab5b0b0d71d6a4e9f01a0fce6

Contents?: true

Size: 744 Bytes

Versions: 3

Compression:

Stored size: 744 Bytes

Contents

require 'spec_helper'

describe TMS::CommandTypes do
  context "loading command types" do
    let(:client) do
      double('client')
    end
    before do
      @command_types = TMS::CommandTypes.new(client, '/command_types')
    end
    it 'should GET ok' do
      body = [{"fields"=>["dcm_account_codes"], "name"=>"dcm_unsubscribe"}, 
              {"fields"=>["dcm_account_code", "dcm_topic_codes"], "name"=>"dcm_subscribe"}, 
              {"fields"=>["http_method", "username", "password", "url"], "name"=>"forward"}] 
      @command_types.client.should_receive(:get).and_return(double('response', :body => body, :status => 200, :headers => {}))
      @command_types.get
      @command_types.collection.length.should == 3
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tms_client-0.1.0 spec/command_types_spec.rb
tms_client-0.0.3 spec/command_types_spec.rb
tms_client-0.0.2 spec/command_types_spec.rb