Sha256: f82b594f811546d13761486dfccc9e2ca8d1d4720b3d64a771e435d702fab6e2

Contents?: true

Size: 835 Bytes

Versions: 17

Compression:

Stored size: 835 Bytes

Contents

describe 'Gratan::Client#export' do
  context 'when chunked by user' do
    subject { client(chunk_by_user: true) }

    before do
      apply(subject) do
        <<-RUBY
user "scott", "%" do
  on "*.*" do
    grant "USAGE"
  end

  on "test.*" do
    grant "SELECT"
  end

  on "test3.*" do
    grant "UPDATE"
  end
end

user "scott", "localhost" do
  on "*.*" do
    grant "USAGE"
  end

  on "test2.*" do
    grant "INSERT"
  end

  on "test3.*" do
    grant "DELETE"
  end
end
        RUBY
      end
    end

    it do
      expect(subject.export.strip).to eq <<-RUBY.strip
user "scott", ["%", "localhost"] do
  on "*.*" do
    grant "USAGE"
  end

  on "test.*" do
    grant "SELECT"
  end

  on "test2.*" do
    grant "INSERT"
  end

  on "test3.*" do
    grant "DELETE"
    grant "UPDATE"
  end
end
      RUBY
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
gratan-0.3.2 spec/export/export_chunk_spec.rb
gratan-0.3.1 spec/export/export_chunk_spec.rb
gratan-0.3.1.beta4 spec/export/export_chunk_spec.rb
gratan-0.3.1.beta3 spec/export/export_chunk_spec.rb
gratan-0.3.1.beta2 spec/export/export_chunk_spec.rb
gratan-0.3.1.beta spec/export/export_chunk_spec.rb
gratan-0.3.0 spec/export/export_chunk_spec.rb
gratan-0.3.0.beta spec/export/export_chunk_spec.rb
gratan-0.2.9 spec/export/export_chunk_spec.rb
gratan-0.2.9.beta3 spec/export/export_chunk_spec.rb
gratan-0.2.9.beta2 spec/export/export_chunk_spec.rb
gratan-0.2.9.beta spec/export/export_chunk_spec.rb
gratan-0.2.8 spec/export/export_chunk_spec.rb
gratan-0.2.8.beta3 spec/export/export_chunk_spec.rb
gratan-0.2.8.beta2 spec/export/export_chunk_spec.rb
gratan-0.2.8.beta spec/export/export_chunk_spec.rb
gratan-0.2.7 spec/export/export_chunk_spec.rb