Sha256: f460a0f26ccaff39f2f581058544770ef22f133ee62bdc512cf2465c2a4fdc1f

Contents?: true

Size: 665 Bytes

Versions: 20

Compression:

Stored size: 665 Bytes

Contents

require 'spec_helper'

describe 'nginx::resource::vhost' do

  describe 'applies allow and deny rules' do
    let (:title) { 'test' }
    let (:params) {{
      :www_root       => '/var/www/nginx',
      :location_allow => ['10.0.0.1', 'host1'],
      :location_deny  => ['host2', '10.0.0.2']
    }}

    it 'applies location_allow rules' do
      should contain_file('/nginx.d/test-500-test-default').with({
        'content' => /allow 10.0.0.1\n  allow host1/
      })
    end
    it 'applies location_deny rules' do
      should contain_file('/nginx.d/test-500-test-default').with({
        'content' => /deny host2\n  deny 10.0.0.2/
      })
    end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.6.0 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.5.2 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.5.1 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.5.0 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.4.1 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.4.0 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.3.3 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.3.2 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.3.1 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.3.0 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.2.1 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.2.0 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.1.0 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.0.6 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.0.5 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.0.4 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.0.3 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.0.2 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb
freighthop-0.0.1 modules/nginx/spec/defines/nginx__resource__vhost_spec.rb