Sha256: 80e02b09ee3cdb5408c5e0fd5638fe81da9918fd957d8533fa2c3b6d3c6507e4

Contents?: true

Size: 1.35 KB

Versions: 33

Compression:

Stored size: 1.35 KB

Contents

require 'spec_helper'

describe EY::Serverside::Maintenance do
  let(:maintenance_path) { deploy_dir.join('shared', 'system', 'maintenance.html') }

  context "deployed application" do
    before do
      deploy_test_application
    end

    it "enables the maintenance page" do
      enable_maintenance
      expect(maintenance_path).to exist
    end

    it "disables an enabled maintenance page" do
      enable_maintenance
      expect(maintenance_path).to exist
      disable_maintenance
      expect(maintenance_path).to_not exist
    end

    it "lets you know if the app is in maintenance mode" do
      maintenance_status
      maintenance_output = read_output.split("\n").select{|l| l.match("Maintenance")}
      expect(maintenance_output.count).to eq(1)
      expect(maintenance_output.first).to match(/Maintenance page: down$/)

      enable_maintenance

      maintenance_status
      maintenance_output = read_output.split("\n").select{|l| l.match("Maintenance")}
      expect(maintenance_output.count).to eq(1)
      expect(maintenance_output.first).to match(/Maintenance page: up$/)

      disable_maintenance

      maintenance_status
      maintenance_output = read_output.split("\n").select{|l| l.match("Maintenance")}
      expect(maintenance_output.count).to eq(1)
      expect(maintenance_output.first).to match(/Maintenance page: down$/)
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
engineyard-serverside-2.8.0.pre4 spec/maintenance_spec.rb
engineyard-serverside-2.8.0.pre spec/maintenance_spec.rb
engineyard-serverside-2.6.17 spec/maintenance_spec.rb
engineyard-serverside-2.6.15.pre spec/maintenance_spec.rb
engineyard-serverside-2.6.14 spec/maintenance_spec.rb
engineyard-serverside-2.6.13 spec/maintenance_spec.rb
engineyard-serverside-2.6.12 spec/maintenance_spec.rb
engineyard-serverside-2.6.12.prewut5 spec/maintenance_spec.rb
engineyard-serverside-2.6.12.prewut4 spec/maintenance_spec.rb
engineyard-serverside-2.6.12.prewut3 spec/maintenance_spec.rb
engineyard-serverside-2.6.12.prewut2 spec/maintenance_spec.rb
engineyard-serverside-2.6.12.prewut1 spec/maintenance_spec.rb
engineyard-serverside-2.6.12.prewut0 spec/maintenance_spec.rb
engineyard-serverside-2.6.11 spec/maintenance_spec.rb
engineyard-serverside-2.6.10 spec/maintenance_spec.rb
engineyard-serverside-2.6.9pre3 spec/maintenance_spec.rb
engineyard-serverside-2.6.9pre2 spec/maintenance_spec.rb
engineyard-serverside-2.6.9pre1 spec/maintenance_spec.rb
engineyard-serverside-2.6.8 spec/maintenance_spec.rb
engineyard-serverside-2.6.8pre2 spec/maintenance_spec.rb