Sha256: e7febb811b2b48a3d436102ebc1157774360eac692b76ead7b5c6dbf766eda27

Contents?: true

Size: 1.41 KB

Versions: 17

Compression:

Stored size: 1.41 KB

Contents

describe 'Gratan::Client#export' do
  context 'when with ignore_object' do
    let(:grantfile) {
      <<-RUBY
user "scott", "%" do
  on "*.*" do
    grant "USAGE"
  end

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

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

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

    subject { client(ignore_object: /test/) }

    before do
      apply(subject) do
        grantfile
      end
    end

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

user "bob", "localhost" do
  on "*.*" do
    grant "USAGE"
  end
end
      RUBY
    end
  end

  context 'when with ignore_object (2)' do
    let(:grantfile) {
      <<-RUBY
user "scott", "%" do
  on "*.*" do
    grant "USAGE"
  end

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

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

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

    subject { client(ignore_object: /bob/) }

    before do
      apply(subject) do
        grantfile
      end
    end

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

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

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

  on "test.*" do
    grant "SELECT"
  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_with_ignore_object_spec.rb
gratan-0.3.1 spec/export/export_with_ignore_object_spec.rb
gratan-0.3.1.beta4 spec/export/export_with_ignore_object_spec.rb
gratan-0.3.1.beta3 spec/export/export_with_ignore_object_spec.rb
gratan-0.3.1.beta2 spec/export/export_with_ignore_object_spec.rb
gratan-0.3.1.beta spec/export/export_with_ignore_object_spec.rb
gratan-0.3.0 spec/export/export_with_ignore_object_spec.rb
gratan-0.3.0.beta spec/export/export_with_ignore_object_spec.rb
gratan-0.2.9 spec/export/export_with_ignore_object_spec.rb
gratan-0.2.9.beta3 spec/export/export_with_ignore_object_spec.rb
gratan-0.2.9.beta2 spec/export/export_with_ignore_object_spec.rb
gratan-0.2.9.beta spec/export/export_with_ignore_object_spec.rb
gratan-0.2.8 spec/export/export_with_ignore_object_spec.rb
gratan-0.2.8.beta3 spec/export/export_with_ignore_object_spec.rb
gratan-0.2.8.beta2 spec/export/export_with_ignore_object_spec.rb
gratan-0.2.8.beta spec/export/export_with_ignore_object_spec.rb
gratan-0.2.7 spec/export/export_with_ignore_object_spec.rb