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