Sha256: 204f9a3c3774134e39528189bcb998f37338ddd0c1ac5b98e6639fcc00eb5b83
Contents?: true
Size: 1.64 KB
Versions: 13
Compression:
Stored size: 1.64 KB
Contents
describe 'Gratan::Client#apply' do context 'when user does not exist' do subject { client } it do result = apply(subject) { '' } expect(result).to be_falsey expect(show_grants).to match_array [] end end context 'when create user with ignore_object' do subject { client(ignore_object: /test/) } it do result = apply(subject) { <<-RUBY user 'scott', 'localhost', identified: 'tiger' do on '*.*' do grant 'SELECT' grant 'INSERT' grant 'UPDATE' grant 'DELETE' end on 'test.*' do grant 'SELECT' grant 'INSERT' grant 'UPDATE' grant 'DELETE' end end RUBY } expect(result).to be_truthy expect(show_grants).to match_array [ "GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'localhost' IDENTIFIED BY PASSWORD '*F2F68D0BB27A773C1D944270E5FAFED515A3FA40'", ] end end context 'when create user with ignore_object (2)' do subject { client(ignore_object: /test2/) } it do result = apply(subject) { <<-RUBY user 'scott', 'localhost', identified: 'tiger' do on '*.*' do grant 'SELECT' grant 'INSERT' grant 'UPDATE' grant 'DELETE' end on 'test.*' do grant 'SELECT' grant 'INSERT' grant 'UPDATE' grant 'DELETE' end end RUBY } expect(result).to be_truthy expect(show_grants).to match_array [ "GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'localhost' IDENTIFIED BY PASSWORD '*F2F68D0BB27A773C1D944270E5FAFED515A3FA40'", "GRANT SELECT, INSERT, UPDATE, DELETE ON `test`.* TO 'scott'@'localhost'", ] end end end
Version data entries
13 entries across 13 versions & 1 rubygems