Sha256: 81357e0fb02da83868fb77445698cf3796b41daa3fdaf91ec7dccc587791fd13
Contents?: true
Size: 1.02 KB
Versions: 11
Compression:
Stored size: 1.02 KB
Contents
require 'minitest/autorun' require 'purecloud' class PureCloudGemTest < Minitest::Test def setup @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] PureCloud.authenticate_with_client_credentials @id, @secret, "mypurecloud.com" #PureCloud.configure.debugging = true end def test_auth_api auth_api = PureCloud::AuthorizationApi.new roles = auth_api.get_roles refute_nil roles #puts roles end def test_oauth_api oauth_api = PureCloud::OAuthApi.new opts = { :body=>PureCloud::OAuthClient.new({ :name => 'Gem Test Client', :description => "generated from gem test script", :authorizedGrantTypes => ["CLIENT-CREDENTIALS"], :roleIds =>["02983623-600c-4779-a0ce-17f79e50e285"] }) } client = oauth_api.create_clients opts refute_nil client oauth_api.delete_client client.id end end
Version data entries
11 entries across 11 versions & 1 rubygems