Sha256: 39b4d1845aa0e0efa960148e393a65a439c4f557cd5e35a2047f76ec9ea2cd86

Contents?: true

Size: 962 Bytes

Versions: 16

Compression:

Stored size: 962 Bytes

Contents

require 'spec_helper'
require 'dpl/provider/ninefold'

describe DPL::Provider::Ninefold do
  subject :provider do
    described_class.new(DummyContext.new, :auth_token => "123456789", :app_id => "1234")
  end

  describe :check_auth do
    it 'requires an auth token' do
      provider.options.update(:auth_token => nil)
      expect{ provider.check_auth }.to raise_error "must supply an auth token"
    end
  end

  describe :check_app do
    it 'requires an app ID' do
      provider.options.update(:app_id => nil)
      expect{ provider.check_app }.to raise_error "must supply an app ID"
    end
  end

  describe :needs_key? do
    it 'returns false' do
      expect(provider.needs_key?).to be_false
    end
  end

  describe :push_app do
    it 'includes the auth token and app ID specified' do
      expect(provider.context).to receive(:shell).with("AUTH_TOKEN=123456789 APP_ID=1234 ninefold app redeploy --sure")
      provider.push_app
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dpl-1.6.1.travis.447.1 spec/provider/ninefold_spec.rb
dpl-1.6.0 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.445.1 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.437.1 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.436.1 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.435.1 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.432.1 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.430.1 spec/provider/ninefold_spec.rb
dpl-1.5.11.travis.414.1 spec/provider/ninefold_spec.rb
dpl-1.5.10 spec/provider/ninefold_spec.rb
dpl-1.5.10.travis.413.1 spec/provider/ninefold_spec.rb
dpl-1.5.10.travis.402.1 spec/provider/ninefold_spec.rb
dpl-1.6.0.travis.399.1 spec/provider/ninefold_spec.rb
dpl-1.5.9 spec/provider/ninefold_spec.rb
dpl-1.5.9.travis.397.1 spec/provider/ninefold_spec.rb
dpl-1.5.9.travis.394.1 spec/provider/ninefold_spec.rb