Sha256: f4a8c0e934cae1e90674a4bd8feabdaafe0f3be73f904c2e640e992d189245c7

Contents?: true

Size: 892 Bytes

Versions: 15

Compression:

Stored size: 892 Bytes

Contents

# encoding: utf-8

require File.dirname(__FILE__) + '/integration_helper'
require 'locomotive/wagon/cli'

describe Locomotive::Wagon::CLI do
  it "overrides subdomains and domains in different environments" do
    clone_site
    deploy = YAML.load_file('site/config/deploy.yml')
    deploy["staging"] = deploy["production"].merge("domains" => ["staging.example.com"], "subdomain" => "staging", "host" => "staging.example.com:3000")
    File.write('site/config/deploy.yml', deploy.to_yaml)
    VCR.use_cassette("staging") do
      Locomotive::Wagon::CLI::Main.start(['push', 'staging', 'site', '-f'])
    end

    WebMock.should_not have_requested(:put, /sites\/.+.json\?auth_token=.+/).with(body: /site\[subdomain\]=sample/)
    WebMock.should have_requested(:put, /sites\/.+.json\?auth_token=.+/).with(body: /site\[subdomain\]=staging&site\[domains\]\[\]=staging.example.com/).once
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.5.8 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.7 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.6 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.5 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.4 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.3 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.2 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.1 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.0 spec/integration/cli_spec.rb
locomotivecms_wagon-1.5.0.rc1 spec/integration/cli_spec.rb
locomotivecms_wagon-1.4.0 spec/integration/cli_spec.rb
locomotivecms_wagon-1.3.3 spec/integration/cli_spec.rb
locomotivecms_wagon-1.3.2 spec/integration/cli_spec.rb
locomotivecms_wagon-1.3.1 spec/integration/cli_spec.rb
locomotivecms_wagon-1.3.0 spec/integration/cli_spec.rb