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-3.0.2 test/missing_api_key_test.rb
fastly-3.0.1 test/missing_api_key_test.rb
fastly-3.0.0 test/missing_api_key_test.rb
fastly-2.5.3 test/missing_api_key_test.rb
fastly-2.5.2 test/missing_api_key_test.rb
fastly-2.5.1 test/missing_api_key_test.rb
fastly-2.5.0 test/missing_api_key_test.rb
fastly-2.4.0 test/missing_api_key_test.rb
fastly-2.3.1 test/missing_api_key_test.rb
fastly-2.3.0 test/missing_api_key_test.rb
fastly-2.2.0 test/missing_api_key_test.rb
fastly-2.1.0 test/missing_api_key_test.rb
fastly-2.0.0 test/missing_api_key_test.rb
fastly-1.15.0 test/missing_api_key_test.rb
fastly-1.14.0 test/missing_api_key_test.rb
fastly-1.13.2 test/missing_api_key_test.rb
fastly-1.13.1 test/missing_api_key_test.rb
fastly-1.13.0 test/missing_api_key_test.rb
fastly-1.12.0 test/missing_api_key_test.rb
fastly-1.11.0 test/missing_api_key_test.rb