mikamai / akamai_api

Akamai gem+CLI to work with CCU and ECCU interfaces
MIT License
43 stars 19 forks source link

Error trying to get CpCodes #9

Closed sebfie closed 11 years ago

sebfie commented 11 years ago

When I try to get CpCodes, i have this error :

 AkamaiApi::CpCode::all should return a collection of models
 Failure/Error: CpCode.all.each { |o| o.should be_a CpCode }
 TypeError:
   can't convert Symbol into Integer
 # ./lib/akamai_api/cp_code.rb:19:in `[]'
 # ./lib/akamai_api/cp_code.rb:19:in `block in all'
 # ./lib/akamai_api/cp_code.rb:17:in `each'
 # ./lib/akamai_api/cp_code.rb:17:in `map'
 # ./lib/akamai_api/cp_code.rb:17:in `all'
 # ./spec/lib/akamai_api/cp_code_spec.rb:14:in `block (3 levels) in <module:AkamaiApi>'

My ruby version : ruby 1.9.3p194

It happens when only one CpCode is returned

sebfie commented 11 years ago

Merged : https://github.com/nicolaracco/akamai_api/pull/8