Sha256: 5185f1204c148edcbe6eed2a7f226f1e4bcba8346fc75cc31dc1a33b718df953

Contents?: true

Size: 838 Bytes

Versions: 481

Compression:

Stored size: 838 Bytes

Contents

require 'spec_helper'
require 'dpl/provider/divshot'

describe DPL::Provider::Divshot do
  subject :provider do
    described_class.new DummyContext.new, :api_key => 'abc123'
  end

  describe "#check_auth" do
    it 'should require an api key' do
      provider.options.update(:api_key => nil)
      expect{ provider.check_auth }.to raise_error("must supply an api key")
    end
  end

  describe "#push_app" do
    it 'should include the environment specified' do
      provider.options.update(:environment => 'development')
      expect(provider.context).to receive(:shell).with("divshot push development --token=abc123")
      provider.push_app
    end

    it 'should default to production' do
      expect(provider.context).to receive(:shell).with("divshot push production --token=abc123")
      provider.push_app
    end
  end
end

Version data entries

481 entries across 481 versions & 3 rubygems

Version Path
dpl-divshot-1.10.4.travis.3030.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.3.travis.3021.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.4.travis.3022.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.3 spec/provider/divshot_spec.rb
dpl-divshot-1.10.3.travis.3020.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.3.travis.3017.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.3.travis.3014.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2 spec/provider/divshot_spec.rb
dpl-divshot-1.10.3.travis.3002.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2.travis.2993.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2.travis.2992.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2.travis.2987.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2.travis.2979.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2.travis.2976.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.1 spec/provider/divshot_spec.rb
dpl-divshot-1.10.2.travis.2966.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.1.travis.2957.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.1.travis.2956.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.1.travis.2947.6 spec/provider/divshot_spec.rb
dpl-divshot-1.10.0 spec/provider/divshot_spec.rb