Sha256: 05dc5d6188ec7745d6818cfabb2c99482c95d51ccbd22650aceb4967dc67db0e

Contents?: true

Size: 763 Bytes

Versions: 4

Compression:

Stored size: 763 Bytes

Contents

# encoding: utf-8

describe "ALTER ROLE" do

  let(:role)      { QueryBuilder::CQL.role(:admin) }
  let(:statement) { role.alter("123456") }

  it_behaves_like :query_builder do
    subject   { statement }
    let(:cql) { "ALTER ROLE admin WITH PASSWORD '123456';" }
  end

  it_behaves_like :query_builder do
    subject   { statement.password(:foobar) }
    let(:cql) { "ALTER ROLE admin WITH PASSWORD 'foobar';" }
  end

  it_behaves_like :query_builder do
    subject   { statement.superuser }
    let(:cql) { "ALTER ROLE admin WITH PASSWORD '123456' SUPERUSER;" }
  end

  it_behaves_like :query_builder do
    subject   { statement.superuser(false) }
    let(:cql) { "ALTER ROLE admin WITH PASSWORD '123456' NOSUPERUSER;" }
  end

end # describe ALTER ROLE

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
query_builder-0.0.4 spec/integration/alter_role_spec.rb
query_builder-0.0.3 spec/integration/alter_role_spec.rb
query_builder-0.0.2 spec/integration/alter_role_spec.rb
query_builder-0.0.1 spec/integration/alter_role_spec.rb