Sha256: 65743dafc4eda1761c8671b83c23c3b7e1e5591a9bc4d20e72681ab56d9fd053
Contents?: true
Size: 1.22 KB
Versions: 13
Compression:
Stored size: 1.22 KB
Contents
describe 'Gratan::Client#apply' do context 'when create user with function' do subject { client } it do create_functions(:foo) do result = apply(subject) { <<-RUBY user 'scott', 'localhost' do on '*.*' do grant 'USAGE' end on 'FUNCTION #{TEST_DATABASE}.foo' do grant 'EXECUTE' end end RUBY } expect(result).to be_truthy expect(show_grants).to match_array [ "GRANT USAGE ON *.* TO 'scott'@'localhost'", "GRANT EXECUTE ON FUNCTION `#{TEST_DATABASE}`.`foo` TO 'scott'@'localhost'" ] end end end context 'when create user with procedure' do subject { client } it do create_procedures(:foo) do result = apply(subject) { <<-RUBY user 'scott', 'localhost' do on '*.*' do grant 'USAGE' end on 'PROCEDURE #{TEST_DATABASE}.foo' do grant 'EXECUTE' end end RUBY } expect(result).to be_truthy expect(show_grants).to match_array [ "GRANT USAGE ON *.* TO 'scott'@'localhost'", "GRANT EXECUTE ON PROCEDURE `#{TEST_DATABASE}`.`foo` TO 'scott'@'localhost'" ] end end end end
Version data entries
13 entries across 13 versions & 1 rubygems