Sha256: 63d4ecaaa643357e7d02f01ded85983b01f9949dfe0b08b8779ed07746d0ee6e

Contents?: true

Size: 971 Bytes

Versions: 64

Compression:

Stored size: 971 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_falsey
    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

64 entries across 64 versions & 1 rubygems

Version Path
dpl-1.7.2.travis.584.1 spec/provider/ninefold_spec.rb
dpl-1.7.2.travis.582.1 spec/provider/ninefold_spec.rb
dpl-1.7.2.travis.581.1 spec/provider/ninefold_spec.rb
dpl-1.7.1 spec/provider/ninefold_spec.rb
dpl-1.7.2.travis.579.1 spec/provider/ninefold_spec.rb
dpl-1.7.1.travis.578.1 spec/provider/ninefold_spec.rb
dpl-1.7.1.travis.577.1 spec/provider/ninefold_spec.rb
dpl-1.7.1.travis.575.1 spec/provider/ninefold_spec.rb
dpl-1.7.1.travis.570.1 spec/provider/ninefold_spec.rb
dpl-1.7.1.travis.567.1 spec/provider/ninefold_spec.rb
dpl-1.7.1.travis.561.1 spec/provider/ninefold_spec.rb
dpl-1.6.10.travis.560.1 spec/provider/ninefold_spec.rb
dpl-1.7.0 spec/provider/ninefold_spec.rb
dpl-1.6.9.travis.557.1 spec/provider/ninefold_spec.rb
dpl-1.6.10.travis.558.1 spec/provider/ninefold_spec.rb
dpl-1.6.9 spec/provider/ninefold_spec.rb
dpl-1.6.9.travis.555.1 spec/provider/ninefold_spec.rb
dpl-1.6.8.travis.554.1 spec/provider/ninefold_spec.rb
dpl-1.6.8 spec/provider/ninefold_spec.rb
dpl-1.6.7 spec/provider/ninefold_spec.rb