Sha256: 8d9f6e65b8d40355b65c8554eda0ab4ff40b4736de088ada68f25581cd07c726

Contents?: true

Size: 850 Bytes

Versions: 6

Compression:

Stored size: 850 Bytes

Contents

require 'test_helper'

describe FastlyRails::Client do

  let(:client) do
    FastlyRails::Client.new(
      :api_key => 'KEY', :user => 'USER', :password => 'PASS'
    )
  end

  it 'should create a fastly rails client' do
    assert_instance_of FastlyRails::Client, client
  end

  it 'should be delegated to the fastly client' do
    assert_instance_of Fastly, client.instance_variable_get('@delegate_dc_obj')
  end

  # This is kind of a static-ish test that technically isn't necessary
  # But if we decide to lock down the methods available from the client
  # through this interface, we can ensure they're available via this test

  it 'should respond to methods available in the fastly client' do

    methods = [
      :purge,
      :get_service
    ]

    methods.each do |method|
      assert_respond_to client, method
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fastly-rails-0.1.5 test/fastly-rails/client_test.rb
fastly-rails-0.1.4 test/fastly-rails/client_test.rb
fastly-rails-0.1.3 test/fastly-rails/client_test.rb
fastly-rails-0.1.2 test/fastly-rails/client_test.rb
fastly-rails-0.1.1 test/fastly-rails/client_test.rb
fastly-rails-0.1.0 test/fastly-rails/client_test.rb