]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/spec/unit/type/keystone_tenant_spec.rb
Update to Kilo
[dsa-puppet.git] / 3rdparty / modules / keystone / spec / unit / type / keystone_tenant_spec.rb
1 require 'spec_helper'
2 require 'puppet'
3 require 'puppet/type/keystone_tenant'
4
5 describe Puppet::Type.type(:keystone_tenant) do
6
7   before :each do
8     @project = Puppet::Type.type(:keystone_tenant).new(
9     :name   => 'foo',
10     :domain => 'foo-domain',
11     )
12
13     @domain = @project.parameter('domain')
14   end
15
16   it 'should not be in sync for domain changes' do
17     expect { @domain.insync?('not-the-domain') }.to raise_error(Puppet::Error, /The domain cannot be changed from/)
18     expect { @domain.insync?(nil) }.to raise_error(Puppet::Error, /The domain cannot be changed from/)
19   end
20
21   it 'should be in sync if domain is the same' do
22     expect(@domain.insync?('foo-domain')).to be true
23   end
24
25 end