Sha256: f631b27af95ac7d65e2e46fd1028163ac97ec405cd5b87190156e01f5c37369e

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

describe 'Gratan::Client#apply' do
  context 'when create user (multi hosts)' do
    subject { client }

    it do
      apply(subject) {
        <<-RUBY
user 'scott', ['localhost', '127.0.0.1', '192.168.%'], 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(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'",
        "GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'127.0.0.1' IDENTIFIED BY PASSWORD '*F2F68D0BB27A773C1D944270E5FAFED515A3FA40'",
        "GRANT SELECT, INSERT, UPDATE, DELETE ON `test`.* TO 'scott'@'127.0.0.1'",
        "GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'192.168.%' IDENTIFIED BY PASSWORD '*F2F68D0BB27A773C1D944270E5FAFED515A3FA40'",
        "GRANT SELECT, INSERT, UPDATE, DELETE ON `test`.* TO 'scott'@'192.168.%'",
      ]
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gratan-0.3.1.beta2 spec/create/create_user_multi_hosts_spec.rb
gratan-0.3.1.beta spec/create/create_user_multi_hosts_spec.rb
gratan-0.3.0 spec/create/create_user_multi_hosts_spec.rb
gratan-0.3.0.beta spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.9 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.9.beta3 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.9.beta2 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.9.beta spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.8 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.8.beta3 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.8.beta2 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.8.beta spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.7 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.6 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.5 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.4 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.3 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.2 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.1 spec/create/create_user_multi_hosts_spec.rb
gratan-0.2.0 spec/create/create_user_multi_hosts_spec.rb