Sha256: ce8a53689088f9a9b16777ccd7c0d5652e70b94248e75af1b9ce2369cd7efa89

Contents?: true

Size: 881 Bytes

Versions: 33

Compression:

Stored size: 881 Bytes

Contents

require 'spec_helper'
require 'heroku-api'
require 'dpl/provider/heroku'

describe DPL::Provider::Heroku do
  subject(:provider) do
    described_class.new(DummyContext.new, :app => 'example', :key_name => 'key', :api_key => "foo", :strategy => "api")
  end

  describe "#ssh" do
    it "doesn't require an ssh key" do
      expect(provider.needs_key?).to eq(false)
    end
  end

  describe "#api" do
    it 'accepts an api key' do
      api = double(:api)
      expect(::Heroku::API).to receive(:new).with(:api_key => "foo").and_return(api)
      expect(provider.api).to eq(api)
    end

    it 'accepts a user and a password' do
      api = double(:api)
      provider.options.update(:user => "foo", :password => "bar")
      expect(::Heroku::API).to receive(:new).with(:user => "foo", :password => "bar").and_return(api)
      expect(provider.api).to eq(api)
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
dpl-1.7.4.travis.600.1 spec/provider/heroku_api_spec.rb
dpl-1.7.3 spec/provider/heroku_api_spec.rb
dpl-1.7.3.travis.597.1 spec/provider/heroku_api_spec.rb
dpl-1.7.3.travis.594.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.592.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.591.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.590.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.589.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.588.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.586.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.584.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.582.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.581.1 spec/provider/heroku_api_spec.rb
dpl-1.7.1 spec/provider/heroku_api_spec.rb
dpl-1.7.2.travis.579.1 spec/provider/heroku_api_spec.rb
dpl-1.7.1.travis.578.1 spec/provider/heroku_api_spec.rb
dpl-1.7.1.travis.577.1 spec/provider/heroku_api_spec.rb
dpl-1.7.1.travis.575.1 spec/provider/heroku_api_spec.rb
dpl-1.7.1.travis.570.1 spec/provider/heroku_api_spec.rb