summaryrefslogtreecommitdiff
path: root/puppet/modules/couchdb/spec/classes/couchdb_spec.rb
blob: e8e4174e69ee16c874279e978c31b552fcdd5b4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'spec_helper'

describe 'couchdb' do
  context 'given it is a wheezy system' do
    let(:params) { {:admin_pw => 'foo'} }
    let(:facts) do
      {
      :operatingsystemrelease => '7',
      :operatingsystem           => 'Debian',
      :lsbdistcodename           => 'wheezy',
      }
    end
    it "should install couchrest 1.2" do
      should contain_package('couchrest').with({
        'ensure'=> '1.2',
      })
    end
  end
  context 'given it is a jessie system' do
    let(:params) { {:admin_pw => 'foo'} }
    let(:facts) do
      {
      :operatingsystemrelease => '8',
      :operatingsystem           => 'Debian',
      :lsbdistcodename           => 'jessie',
      }
    end
    it "should install latest couchrest version" do
      should contain_package('couchrest').with({
        'ensure'=> 'latest',
      })
    end
  end
end