Sha256: 3b2066f2d3a1831fa8086afba35df8b319bc8aa2b8f374afe820e6976599948d

Contents?: true

Size: 590 Bytes

Versions: 36

Compression:

Stored size: 590 Bytes

Contents

require 'helper'

class MissingApiKeyTest < Fastly::TestCase
  include CommonTests

  def setup
    # missing API key
    @opts = login_opts(:full)
    begin
      @client = Fastly::Client.new(@opts)
      @fastly = Fastly.new(@opts)
    rescue Exception => e
      pp e
      exit(-1)
    end
  end

  def test_purging
    service_name = "fastly-test-service-#{random_string}"
    service      = @fastly.create_service(:name => service_name)

    assert_raises Fastly::KeyAuthRequired do
      service.purge_by_key('somekey')
    end
  ensure
    @fastly.delete_service(service)
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fastly-1.10.0 test/missing_api_key_test.rb
fastly-1.9.0 test/missing_api_key_test.rb
fastly-1.8.0 test/missing_api_key_test.rb
fastly-1.7.0 test/missing_api_key_test.rb
fastly-1.6.1 test/missing_api_key_test.rb
fastly-1.6.0 test/missing_api_key_test.rb
fastly-1.5.0 test/missing_api_key_test.rb
fastly-1.4.3 test/missing_api_key_test.rb
fastly-1.4.2 test/missing_api_key_test.rb
fastly-1.4.1 test/missing_api_key_test.rb
fastly-1.4.0 test/missing_api_key_test.rb
fastly-1.3.0 test/missing_api_key_test.rb
fastly-1.2.3 test/missing_api_key_test.rb
fastly-1.2.2 test/missing_api_key_test.rb
fastly-1.2.1 test/missing_api_key_test.rb
fastly-1.2.0 test/missing_api_key_test.rb