Sha256: 1d33ba3fec5ea8c5a5fdd0650a937df875b076a25e153a58fe0f89c3e7073639

Contents?: true

Size: 893 Bytes

Versions: 313

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'
require 'dpl/provider/modulus'

describe DPL::Provider::Modulus do
  subject :provider do
    described_class.new(DummyContext.new, :api_key => 'test-token', :project_name => 'test-project')
  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 "#check_app" do
    it 'should require a project name' do
      provider.options.update(:project_name => nil)
      expect{ provider.check_app }.to raise_error("must supply a project name")
    end
  end

  describe "#push_app" do
    it 'should include the api key and project name specified' do
      expect(provider.context).to receive(:shell).with("env MODULUS_TOKEN=test-token modulus deploy -p test-project")
      provider.push_app
    end
  end
end

Version data entries

313 entries across 313 versions & 3 rubygems

Version Path
dpl-modulus-1.10.4.travis.3054.5 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3053.5 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3047.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3040.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3032.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3031.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3030.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.3.travis.3021.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.3 spec/provider/modulus_spec.rb
dpl-modulus-1.10.4.travis.3022.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.3.travis.3020.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.3.travis.3017.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.3.travis.3014.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.2 spec/provider/modulus_spec.rb
dpl-modulus-1.10.3.travis.3002.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.2.travis.2993.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.2.travis.2992.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.2.travis.2987.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.2.travis.2979.6 spec/provider/modulus_spec.rb
dpl-modulus-1.10.2.travis.2976.6 spec/provider/modulus_spec.rb