aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
Commit message (Collapse)AuthorAgeFilesLines
* restores the API docs of AR::Fixtures, made a quick pass over them, revises ↵Xavier Noria2011-09-031-1/+1
| | | | link in fixture template [closes #2840]
* Quote these dates to prevent intermittent test failure. Suppose local time ↵Jon Leighton2011-08-041-2/+2
| | | | is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved.
* Revert "this fixes a brittle test in fixtures_test.rb which fails when you ↵Aaron Patterson2011-07-201-2/+2
| | | | | | are in a timezone which is ahead of UTC but UTC is in the previous day still." This reverts commit f92cefa95f44bcd550c402a7f5ba914f3bd783cc.
* this fixes a brittle test in fixtures_test.rb which fails when you are in a ↵Josh Kalderimis2011-07-201-2/+2
| | | | timezone which is ahead of UTC but UTC is in the previous day still.
* Revert "Fix failure in test_preserves_existing_fixture_data from ↵Jon Leighton2011-07-171-2/+2
| | | | | | test/cases/fixtures_test.rb when UTC and local time occur on different dates." I am pretty sure this was an incorrect fix, and it still failed in certain circumstances anyway. I am now unable to reproduce the original failure I was experiencing so will leave it for now and see if this pops up again. This reverts commit e4479b2f1bc54edf155408d51dd3236955150ce1.
* Fix failure in test_preserves_existing_fixture_data from ↵Jon Leighton2011-07-121-2/+2
| | | | test/cases/fixtures_test.rb when UTC and local time occur on different dates.
* properly reference yml alias nodesdmathieu2011-05-241-1/+1
| | | | as per the last version of the yml specifications : http://www.yaml.org/spec/1.2/spec.html#* alias//
* fixing 1.8 support for new fixture testsAaron Patterson2011-05-231-1/+1
|
* Don't use select() values from the join model of a through association. ↵Jon Leighton2011-05-111-0/+7
| | | | Fixes #508.
* deprecating CSV fixture supportAaron Patterson2011-05-101-0/+0
|
* Don't quote ID's as Arel will quote them -- follow same conventions as the ↵Christopher Meiklejohn2011-05-081-0/+7
| | | | delete method.
* Namespace Fixtures in ActiveRecordJason Noble2011-05-072-6/+6
| | | [Fixes #439]
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-101-1/+1
|\
| * revises links to the API websites of individual components (no longer ↵Xavier Noria2011-03-091-1/+1
| | | | | | | | maintained), and rewrites the section about after and around filters in the controller guide
* | Add a test for STI on the through where the through is nested, and change ↵Jon Leighton2011-03-051-0/+10
| | | | | | | | the code which support this
* | Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-047-2/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-159-8/+30
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/nested_attributes.rb activerecord/test/cases/relations_test.rb
| | * Correctly update counter caches on deletion for has_many :through [#2824 ↵Jon Leighton2011-02-071-0/+2
| | | | | | | | | | | | state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business.
| | * has_one should always remove the old record (properly), even if not saving ↵Jon Leighton2011-01-111-0/+1
| | | | | | | | | | | | the new record, so we don't get the database into a pickle
| | * Make serialized fixtures work againPratik Naik2010-12-291-0/+6
| | |
| | * Associations: DRY up the code which is generating conditions, and make it ↵Jon Leighton2010-12-261-1/+0
| | | | | | | | | | | | all use arel rather than SQL strings
| | * Fix dodgy tests which were effectively asserting nil == nilJon Leighton2010-12-261-0/+1
| | |
| | * using arel to compile sql statementsAaron Patterson2010-12-251-0/+1
| | |
| | * If a has_many goes :through a belongs_to, and the foreign key of the ↵Jon Leighton2010-12-235-8/+20
| | | | | | | | | | | | belongs_to changes, then the has_many should be considered stale.
| * | IdentityMap - Tests for IMMarcin Raczkowski2010-11-191-0/+4
| |/
| * Add some tests for functionality in JoinAssociation which already exists but ↵Jon Leighton2010-10-131-0/+6
| | | | | | | | was previously untested
* | Support the :primary_key option on a through reflection in a nested through ↵Jon Leighton2010-10-191-0/+2
| | | | | | | | association
* | Support for :primary_key option on the source reflection of a through ↵Jon Leighton2010-10-192-1/+2
| | | | | | | | association, where the source is a has_one or has_many
* | Respect the :primary_key option on the through_reflection of (non-nested) ↵Jon Leighton2010-10-191-0/+6
| | | | | | | | through associations
* | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-193-0/+46
| | | | | | | | through association
* | Add test_has_one_through_has_one_through_with_belongs_to_source_reflectionJon Leighton2010-10-143-1/+13
| |
* | Added ↵Jon Leighton2010-10-141-0/+6
| | | | | | | | test_has_many_through_has_many_with_has_many_through_habtm_source_reflection and make it pass
* | First bit of support for habtm in through assocs - ↵Jon Leighton2010-10-132-2/+7
| | | | | | | | test_has_many_through_has_many_with_has_and_belongs_to_many_source_reflection now passes
* | Add a commented, failing test for using a habtm in a has many through ↵Jon Leighton2010-10-121-0/+8
| | | | | | | | association. I want to refactor how aliasing works first.
* | Adding test_has_many_through_has_one_with_has_many_through_source_reflection ↵Jon Leighton2010-10-121-0/+5
| | | | | | | | and modifying ThroughAssociationScope to make it work correctly.
* | Support has_one through assocs as the source associationJon Leighton2010-10-124-6/+14
| |
* | Add support for nested through associations in JoinAssociation. Hence ↵Jon Leighton2010-10-091-0/+14
| | | | | | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored.
* | Refactoring JoinDependency and friends. This improves the code (IMO) ↵Jon Leighton2010-10-061-0/+6
| | | | | | | | including adding some explanatory comments, but more importantly structures it in such a way as to allow a JoinAssociation to produce an arbitrary number of actual joins, which will be necessary for nested has many through support. Also added 3 tests covering functionality which existed but was not previously covered.
* | Add support for table aliasing, with a test that needs aliasing in order to ↵Jon Leighton2010-10-024-1/+31
| | | | | | | | work correctly. This test incidentally provides a more complicated test case (4 inner joins, 2 using polymorphism).
* | Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-261-0/+2
|/
* order should always be concatenated.Neeraj Singh2010-09-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | order that is declared first has highest priority in all cases. Here are some examples. Car.order('name desc').find(:first, :order => 'id').name Car.named_scope_with_order.named_scope_with_another_order Car.order('id DESC').scoping do Car.find(:first, :order => 'id asc') end No special treatment to with_scope or scoping. Also note that if default_scope declares an order then the order declared in default_scope has the highest priority unless with_exclusive_scope is used. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-147-12/+11
| | | | 's/[ \t]*$//' -i {} \;)
* test and fix collection_singular_ids= with string primary keys [#5125 ↵Robert Pankowecki2010-08-021-1/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* update_attribute should not update readonly attributesNeeraj Singh2010-07-211-0/+1
| | | | | | [#5106 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* string IDs are now quoted correctly [#5064 state:resolved]Will St. Clair + Neeraj Singh2010-07-133-0/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* reset_counter should work with non-traditional belongs_to and polymorphic ↵Neeraj Singh2010-07-081-0/+4
| | | | | | | | belongs_to [#4984 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Test for concatenated orders addedSantiago Pastorino2010-06-261-1/+1
| | | | | | [#4972] Signed-off-by: José Valim <jose.valim@gmail.com>
* Support fixtures for namespaced models [#2965 state:resolved]Andrew White2010-04-252-0/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* fixing invalid yaml [#4424 state:resolved]Aaron Patterson2010-04-171-1/+2
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Refactor compute_type to handle situations where the correct class is ↵Andrew White2010-04-123-0/+11
| | | | | | already loaded Signed-off-by: wycats <wycats@gmail.com>