Sha256: 6ae67f410b54aed5a274dbe6be954deb7878041b9b0d258f6a70aa9a9a505ae4

Contents?: true

Size: 638 Bytes

Versions: 1

Compression:

Stored size: 638 Bytes

Contents

require 'spec_helper'

describe Ridley::Connection do
  let(:server_url) { "https://api.opscode.com" }
  let(:client_name) { "reset" }
  let(:client_key) { fixtures_path.join("reset.pem").to_s }

  subject do
    described_class.new(server_url, client_name, client_key)
  end

  describe "#api_type" do
    it "returns :foss if the organization is not set" do
      subject.stub(:organization).and_return(nil)

      subject.api_type.should eql(:foss)
    end

    it "returns :hosted if the organization is set" do
      subject.stub(:organization).and_return("vialstudios")

      subject.api_type.should eql(:hosted)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ridley-0.7.0.rc1 spec/unit/ridley/connection_spec.rb