Sha256: 86ea4e0e9b8d5fb9c3c9c32c9912b642b44bb44d219e15176b2079ed6bdc130c

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

require "#{File.dirname(__FILE__)}/../spec_helper"

describe SQLTree::Node::DeleteQuery do

  it "should parse a delete query without WHERE clause correctly" do
    delete = SQLTree::Node::DeleteQuery["DELETE FROM table"]
    delete.table.should == 'table'
    delete.where.should be_nil
  end

  it "should parse a delete query without WHERE clause correctly" do
    delete = SQLTree::Node::DeleteQuery["DELETE FROM table WHERE 1 = 1"]
    delete.table.should == 'table'
    delete.where.should be_kind_of(SQLTree::Node::Expression)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sql_tree-0.1.0 spec/unit/delete_query_spec.rb