Sha256: 368df83d1f70737486834a3e8256961e5488b5f6ba9752e10b014ac3742aff4c

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

require 'minitest/autorun'
require './lib/amazon_athena/commands/drop_database'

describe AmazonAthena::Commands::DropDatabase do

  before do
    @cmd = AmazonAthena::Commands::DropDatabase.new("mydb")
  end

  it "provides a db statement" do
    assert_equal "DROP DATABASE IF EXISTS mydb;", @cmd.statement
  end

  it "executes a query" do
    results = MiniTest::Mock.new

    conn = MiniTest::Mock.new
    conn.expect(:query, results, ["DROP DATABASE IF EXISTS mydb;"])

    @cmd.run(conn)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
athena-cli-0.1.0 test/lib/amazon_athena/commands/drop_database_test.rb