Sha256: 522843f2959a9be25762f35ca30f8f42b59b91b78c7b76c52881d80b82690862

Contents?: true

Size: 743 Bytes

Versions: 14

Compression:

Stored size: 743 Bytes

Contents

require 'puppet'
require 'puppet/type/mysql_database'
describe Puppet::Type.type(:mysql_database) do

  before :each do
    @user = Puppet::Type.type(:mysql_database).new(:name => 'test', :charset => 'utf8', :collate => 'utf8_blah_ci')
  end

  it 'should accept a database name' do
    @user[:name].should == 'test'
  end

  it 'should accept a charset' do
    @user[:charset] = 'latin1'
    @user[:charset].should == 'latin1'
  end

  it 'should accept a collate' do
    @user[:collate] = 'latin1_swedish_ci'
    @user[:collate].should == 'latin1_swedish_ci'
  end

  it 'should require a name' do
    expect {
      Puppet::Type.type(:mysql_database).new({})
    }.to raise_error(Puppet::Error, 'Title or name must be provided')
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.6.0 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.5.2 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.5.1 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.5.0 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.4.1 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.4.0 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.3.3 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.3.2 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.3.1 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.3.0 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.2.1 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.2.0 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb
freighthop-0.1.0 modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb