Sha256: af86b5678069b6a180096e57a352149ab19711a39ca88ff07b78408a22649163

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

# Copyright 2000-2014 NeuStar, Inc. All rights reserved.
# NeuStar, the Neustar logo and related names and logos are registered
# trademarks, service marks or tradenames of NeuStar, Inc. All other
# product names, company names, marks, logos and symbols may be trademarks
# of their respective owners.

require_relative 'test_helper'

class TestAuthentication < Minitest::Unit::TestCase
  include UltraDNSCredentials

  TEST_ACCOUNT = ENV['ULTRA_ACCOUNT'] || "jdamick"

  def setup
    setup_credentials
  end

  def test_auth
    VCR.use_cassette('test_auth') do
      client = Ultradns::Client.new(@user, @pw)

      pp client.account(TEST_ACCOUNT).zones

      pp client.accounts

      result = client.status
      assert result['message'] != nil
    end
  end

  def test_auth_failure
    VCR.use_cassette('test_auth_failure') do
      client = Ultradns::Client.new(@user, @pw)
      client.instance_eval { @auth[:access_token] = 'xx' }
      response = client.status
      assert response['message'] != nil
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ultradns-sdk-fixed-0.0.7 test/test_authentication.rb
ultradns-sdk-0.0.6 test/test_authentication.rb
ultradns-sdk-0.0.5 test/test_authentication.rb
ultradns-sdk-0.0.4 test/test_authentication.rb
ultradns-sdk-0.0.3 test/test_authentication.rb
ultradns-sdk-0.0.2 test/test_authentication.rb