Sha256: 695af034c7362b173997a5bf37d2e265f677210d20539f1070fa317f50aaad65

Contents?: true

Size: 1.38 KB

Versions: 13

Compression:

Stored size: 1.38 KB

Contents

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

describe "RhoconnectApiGetLicenseInfo" do
  it_should_behave_like "ApiHelper" do
    it "should get license info" do
      get "/rc/#{Rhoconnect::API_VERSION}/system/license", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
      JSON.parse(last_response.body).should == {
        "available" => 9, 
        "issued" => "Fri Apr 23 17:20:13 -0700 2010", 
        "seats" => 10, 
        "rhoconnect_version" => "Version 1",
        "licensee" => "Rhomobile" }
    end
    
    it "should get custom_license info with deprecation warning" do
      # this one for test purposes to make sure
      # that an old way custom REST API still works
      Rhoconnect::Server.api :custom_license_info do |params,user|
        {:rhoconnect_version => Rhoconnect.license.rhoconnect_version, 
         :licensee => Rhoconnect.license.licensee, 
         :seats => Rhoconnect.license.seats, 
         :issued => Rhoconnect.license.issued,
         :available => Rhoconnect.license.available }.to_json
      end
      
      post "/api/custom_license_info", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
      JSON.parse(last_response.body).should == {
        "available" => 9, 
        "issued" => "Fri Apr 23 17:20:13 -0700 2010", 
        "seats" => 10, 
        "rhoconnect_version" => "Version 1",
        "licensee" => "Rhomobile" }
    end
  end  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rhoconnect-3.4.5 spec/api/system/get_license_info_spec.rb
rhoconnect-3.4.4 spec/api/system/get_license_info_spec.rb
rhoconnect-3.4.3 spec/api/system/get_license_info_spec.rb
rhoconnect-3.4.2 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.6 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.5 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.4 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.3 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.2 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.1 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.1.beta4 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.1.beta3 spec/api/system/get_license_info_spec.rb
rhoconnect-3.3.1.beta2 spec/api/system/get_license_info_spec.rb