Sha256: 608a66c7bf24509fabf7511fdf86823b2b28eeea40e4011bd17c88d87f68e903

Contents?: true

Size: 660 Bytes

Versions: 48

Compression:

Stored size: 660 Bytes

Contents

require File.join(File.dirname(__FILE__),'api_helper')

describe "RhosyncApiListUsers" do
  it_should_behave_like "ApiHelper"
  
  it "should list clients" do
    post "/api/list_clients", {:api_token => @api_token,
      :user_id => @u_fields[:login]}
    res = JSON.parse(last_response.body)
    res.is_a?(Array).should == true
    res.size.should == 1
    res[0].is_a?(String) == true
    res[0].length.should == 32
  end
  
  it "should handle empty client's list" do
    @u.clients.delete(@c.id)
    post "/api/list_clients", {:api_token => @api_token, 
      :user_id => @u_fields[:login]}
    JSON.parse(last_response.body).should == []    
  end
  
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
rhosync-2.1.18.beta2 spec/api/list_clients_spec.rb
rhosync-2.1.18.beta1 spec/api/list_clients_spec.rb
rhosync-2.1.17 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta7 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta6 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta5 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta4 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta3 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta2 spec/api/list_clients_spec.rb
rhosync-2.1.17.beta1 spec/api/list_clients_spec.rb
rhosync-2.1.16 spec/api/list_clients_spec.rb
rhosync-2.1.15 spec/api/list_clients_spec.rb
rhosync-2.1.14 spec/api/list_clients_spec.rb
rhosync-2.1.13 spec/api/list_clients_spec.rb
rhosync-2.1.12 spec/api/list_clients_spec.rb
rhosync-2.1.11 spec/api/list_clients_spec.rb
rhosync-2.1.10 spec/api/list_clients_spec.rb
rhosync-2.1.7 spec/api/list_clients_spec.rb
rhosync-2.1.6 spec/api/list_clients_spec.rb
rhosync-2.1.3 spec/api/list_clients_spec.rb