Sha256: 034b9798bdbac8a98f3921526bccbc21ed6e0164fa35c727662b522d5f390330

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require File.dirname(__FILE__) + '/../../lib/etsy4r'

describe Etsy4r::ServerCommands do
  include Etsy4rSpecHelper
  
  before do
    @client = etsy4r_client
    @server_commands = Etsy4r::ServerCommands.new(@client)
  end
    
  describe 'initialize' do    
    it 'set the client' do 
      @server_commands.client.class.should == Etsy4r::Client
    end
  end
  
  describe 'get_method_table' do
    it 'should get all methods' do
      @res = @server_commands.get_method_table
      @res.should be_success
      @res.results.should_not be_nil
      @res.error_message.should be_blank
    end
  end
  
  describe 'ping' do
    it 'should ping the server' do
      @res = @server_commands.ping
      @res.should be_success
      @res.results.should_not be_nil
      @res.error_message.should be_blank
    end
  end
  
  describe 'get_server_epoch' do
    it 'should return the server time' do
      @res = @server_commands.get_server_epoch
      @res.should be_success
      @res.results.should_not be_nil
      @res.error_message.should be_blank
    end
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tcocca-etsy4r-0.1.0 spec/etsy4r/server_commands_spec.rb
tcocca-etsy4r-0.2.0 spec/etsy4r/server_commands_spec.rb
tcocca-etsy4r-0.3.0 spec/etsy4r/server_commands_spec.rb
tcocca-etsy4r-0.3.1 spec/etsy4r/server_commands_spec.rb
tcocca-etsy4r-0.3.2 spec/etsy4r/server_commands_spec.rb
tcocca-etsy4r-0.4.0 spec/etsy4r/server_commands_spec.rb