Sha256: 4e42f5816da86bbc3f73eeeca72149de2f112385894f63aa68e27054a89ffb5f

Contents?: true

Size: 832 Bytes

Versions: 23

Compression:

Stored size: 832 Bytes

Contents

require 'spec_helper'

describe Ridley::Middleware::ChefAuth do
  let(:server_url) { "https://api.opscode.com/organizations/vialstudios/" }

  describe "ClassMethods" do
    subject { described_class }

    describe "#authentication_headers" do
      let(:client_name) { "reset" }
      let(:client_key) { fixtures_path.join("reset.pem") }

      it "returns a Hash of authentication headers" do
        options = {
          http_method: "GET",
          host: "https://api.opscode.com",
          path: "/something.file"
        }
        subject.authentication_headers(client_name, client_key, options).should be_a(Hash)
      end
    end
  end

  subject do
    Faraday.new(server_url) do |conn|
      conn.request :chef_auth, "reset", "/Users/reset/.chef/reset.pem"
      conn.adapter Faraday.default_adapter
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ridley-0.12.1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.12.0 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.11.2 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.12.0.rc1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.11.1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.10.2 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.9.1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.10.1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.11.0.rc1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.10.0 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.10.0.rc3 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.10.0.rc2 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.10.0.rc1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.9.0 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.8.6 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.8.5 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.8.3 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.8.2 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.8.1 spec/unit/ridley/middleware/chef_auth_spec.rb
ridley-0.8.0 spec/unit/ridley/middleware/chef_auth_spec.rb