Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 99f030934e
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (16 sloc) 0.44 kb
require "cases/helper"
require 'models/post'
module ActiveRecord
class WhereTest < ActiveRecord::TestCase
fixtures :posts
def test_where_error
assert_raises(ActiveRecord::StatementInvalid) do
Post.where(:id => { 'posts.author_id' => 10 }).first
end
end
def test_where_with_table_name
post = Post.first
assert_equal post, Post.where(:posts => { 'id' => post.id }).first
end
end
end
Jump to Line
Something went wrong with that request. Please try again.