Namespace
Methods
- T
-
- test_association_methods,
- test_construction,
- test_create_with_value,
- test_create_with_value_with_wheres,
- test_eager_load_values,
- test_empty_eager_loading?,
- test_empty_where_values_hash,
- test_extensions,
- test_has_values,
- test_initialize_association_methods,
- test_initialize_single_values,
- test_multi_value_initialize,
- test_multi_value_methods,
- test_scope_for_create,
- test_scope_for_create_is_cached,
- test_single_values,
- test_table_name_delegates_to_klass,
- test_tree_is_not_traversed,
- test_values_wrong_table
Instance Public methods
test_association_methods()
Link
test_construction()
Link
test_create_with_value()
Link
test_create_with_value_with_wheres()
Link
# File activerecord/test/cases/relation_test.rb, line 109 def test_create_with_value_with_wheres relation = Relation.new Post, Post.arel_table relation.where_values << relation.table[:id].eq(10) relation.create_with_value = {:hello => 'world'} assert_equal({'hello' => 'world', 'id' => 10}, relation.scope_for_create) end
test_eager_load_values()
Link
test_empty_eager_loading?()
Link
test_empty_where_values_hash()
Link
test_extensions()
Link
test_has_values()
Link
test_initialize_association_methods()
Link
test_initialize_single_values()
Link
test_multi_value_initialize()
Link
test_multi_value_methods()
Link
test_scope_for_create()
Link
test_scope_for_create_is_cached()
Link
FIXME: is this really wanted or expected behavior?
# File activerecord/test/cases/relation_test.rb, line 117 def test_scope_for_create_is_cached relation = Relation.new Post, Post.arel_table assert_equal({}, relation.scope_for_create) relation.where_values << relation.table[:id].eq(10) assert_equal({}, relation.scope_for_create) relation.create_with_value = {:hello => 'world'} assert_equal({}, relation.scope_for_create) end
test_single_values()
Link
test_table_name_delegates_to_klass()
Link
test_tree_is_not_traversed()
Link
# File activerecord/test/cases/relation_test.rb, line 83 def test_tree_is_not_traversed relation = Relation.new Post, Post.arel_table left = relation.table[:id].eq(10) right = relation.table[:id].eq(10) combine = left.and right relation.where_values << combine assert_equal({}, relation.where_values_hash) end