Sha256: 5fcea76cd352eca2451d9e2c50472388ca4154dce8045dbb2d4b0442a1457bf2

Contents?: true

Size: 1.37 KB

Versions: 22

Compression:

Stored size: 1.37 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
      true.should == true
      post "/api/admin/get_license_info", {:api_token => @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
      true.should == true
      
      # 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", {:api_token => @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

22 entries across 22 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.2.0 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.2.0.beta5 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.2.0.beta4 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.2.0.beta3 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.2.0.beta2 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.2.0.beta1 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.1.2 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.1.1 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.1.0 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.1.0.beta2 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.1.0.beta1 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.6 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.5 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.4 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.3 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.2 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.1 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.0 spec/api/admin/get_license_info_spec.rb
rhoconnect-3.0.0.rc1 spec/api/admin/get_license_info_spec.rb