Fixed testing for creating a DB with the [if not exists] clause

This commit is contained in:
Srinath M 2013-12-16 09:59:43 -05:00
parent 1cc07977c5
commit a571df4c79

View file

@ -56,7 +56,7 @@ test
describe 'create' do
it 'makes a database' do
provider.expects(:mysql).with([defaults_file, '-NBe', "create database `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"])
provider.expects(:mysql).with([defaults_file, '-NBe', "create database if not exists `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"])
provider.expects(:exists?).returns(true)
provider.create.should be_true
end