Sha256: 7047f5728cf6f4e9c14cb071ec187649876d67c26302d0f8b2ee943e3e53ae9f

Contents?: true

Size: 979 Bytes

Versions: 67

Compression:

Stored size: 979 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 --robot --sure")
      provider.push_app
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
dpl-1.7.12 spec/provider/ninefold_spec.rb
dpl-1.7.13.travis.825.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.807.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.797.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.793.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.784.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.783.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.774.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.773.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.766.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.764.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.763.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.762.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.748.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.742.4 spec/provider/ninefold_spec.rb
dpl-1.7.12.travis.734.4 spec/provider/ninefold_spec.rb
dpl-1.7.11.travis.733.4 spec/provider/ninefold_spec.rb
dpl-1.7.11 spec/provider/ninefold_spec.rb
dpl-1.7.10 spec/provider/ninefold_spec.rb
dpl-1.7.11.travis.726.4 spec/provider/ninefold_spec.rb