Ernie Miller
a4eaa1fd39
Fix multiple self-referencing eager loads failing to join multiple times
...
[#4679 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-08 01:02:19 -04:00
wycats
b97a3f33a3
Merge remote branch 'rsim/oracle_enhanced_rails3'
2010-06-07 23:03:59 -04:00
Santiago Pastorino
94ed39d146
This test shouldn't rely on the order of the data returned by select
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-07 20:06:31 -04:00
José Valim
a04060fb6f
Really make include_root_in_json default to true [ #3770 state:resolved]
2010-06-08 01:02:45 +02:00
José Valim
634c9310e3
Make the logic for nested_records_changed_for_autosave? simpler.
...
[#4648 state:resolved]
2010-06-07 11:01:10 +02:00
Carlos Antonio da Silva
7eedc3f397
Fixing test class names and refactor line in autosave association
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-07 10:45:47 +02:00
Tom Meier
3f1cdb85b8
Require active support/string/conversions so constantize can be used in associations.rb
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-07 10:29:26 +02:00
Jeremy Kemper
a5f3f3ef7a
MySQL: require 2.7 or later so we can rely on result.each_hash
2010-06-05 14:59:51 -07:00
wycats
a260e02fd3
Whoops. _run_*_callbacks is private
2010-06-04 20:11:05 -07:00
wycats
a87b627297
Use faster form of running callbacks
2010-06-04 20:11:05 -07:00
Xavier Noria
67a43554f1
removes Array#random_element and backports Array#sample from Ruby 1.9, thanks to Marc-Andre Lafortune
2010-06-05 01:15:17 +02:00
Raimonds Simanovskis
acef8feafa
compare sorted arrays in relations_test
...
Oracle does not guarantee that SELECT will return records ordered by primary key
2010-06-04 22:58:55 +03:00
Raimonds Simanovskis
c51fa6bdfc
ignore raw_sql_ table alias that is used by Oracle adapter
2010-06-04 22:44:04 +03:00
Raimonds Simanovskis
b0fdd290f4
fix test_belongs_to_with_primary_key_joins_on_correct_column test on Oracle
2010-06-04 22:44:04 +03:00
Raimonds Simanovskis
edf79a7fe7
Downcase quoted table name in regex in count_aliases_from_table_joins
...
Oracle adapter's quote_table_name returns quoted table name in uppercase and therefore it should be downcased before scanning downcased join_sql
2010-06-04 22:44:03 +03:00
Raimonds Simanovskis
05ef038bb9
Fixed adapter tests not to assert LIMIT and OFFSET in SQL strings
...
Fixed adapter test cases that were failing in oracle because the asserts were looking for the presence of offset and limit which are not available in oracle. Changed the tests to check that the sql injection is not present in the output so that the tests are database adapter agnostic.
2010-06-04 22:44:03 +03:00
Raimonds Simanovskis
c6d6b50166
ignore selects from data dictionary views when running tests on Oracle
2010-06-04 22:44:03 +03:00
Raimonds Simanovskis
a82e067091
assert log output match in case insensitive mode to avoid failure when quoted table name is in uppercase (when using Oracle)
2010-06-04 22:44:03 +03:00
Raimonds Simanovskis
a83e6b1b6a
downcase table names in aliased_table_name_for and references_eager_loaded_tables? methods (as Oracle quoted table names are in uppercase)
2010-06-04 22:44:03 +03:00
Raimonds Simanovskis
464b7f3ddc
test fixes for Oracle enhanced adapter:
...
latest oracle_enhanced adapter does automatic shortening of index names
ignore select from all_triggers table in assert_queries
2010-06-04 22:44:03 +03:00
Raimonds Simanovskis
9bf7b6334f
do order by id when finding first fixture to ensure that it is correct one
...
(as otherwise was failing under JRuby and oracle_enhanced adapter)
2010-06-04 22:44:02 +03:00
Raimonds Simanovskis
f12f377680
Oracle enhanced adapter now supports shortening of default generated index names, some additional tests now pass
2010-06-04 22:44:02 +03:00
Raimonds Simanovskis
6356a48faa
Reduced size of table name prefix and suffix in migrations test as in Oracle identifier name cannot be larger than 30 characters
2010-06-04 22:44:02 +03:00
Raimonds Simanovskis
8136230cca
Explicitly set Topic model last_read attribute as Date value when Oracle enhanced adapter is used
...
(otherwise some tests are failing which assume that this attribute will have Date value)
2010-06-04 22:44:02 +03:00
Raimonds Simanovskis
eec90bab28
create DateTime value with local offset as later it is compared to Time value with local offset
...
(otherwise test is failing for oracle_enhanced JDBC adapter)
2010-06-04 22:44:02 +03:00
Pratik Naik
517f709b51
Properly cache association_collection#scopes calls having arguments
2010-06-04 00:53:45 +01:00
Pratik Naik
4b91daff13
Special treatement for Relation#select { with block }
2010-06-02 14:42:25 +01:00
José Valim
0570720d66
Configure generators before invoking.
2010-06-02 09:37:38 +02:00
Santiago Pastorino
0bed93be25
Unforce tzinfo from AS
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-01 09:16:19 +02:00
Michael Koziarski
564ab4776c
Merge commit 'mislav/counter_cache'
2010-05-29 14:06:02 +12:00
Santiago Pastorino
47d568ed3f
Refactor calculation test to remove unneeded SQLite special case.
...
[#4633 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-24 20:54:38 -07:00
Mislav Marohnić
bc84bd17d1
fix reset_counters to work even with complex class names
...
e.g. it guesses that a belongs_to association to Namespace::MyModel is
named "my_model", unlike before where it would look up an association
named "namespace::mymodel" and fail.
2010-05-24 11:44:53 +02:00
Mislav Marohnić
bfca7d744d
move counter_cache tests to a separate file and refactor
2010-05-24 11:42:03 +02:00
Mislav Marohnić
f493f31533
cleanup update/reset_counters: less SQL strings, more ActiveRecord/Arel
2010-05-24 11:42:03 +02:00
José Valim
ad4be3d75d
Fix failing test.
2010-05-21 16:20:56 +02:00
Neeraj Singh
1bc6b43f53
Replace assert with assert_equal in some test cases
...
[#4654 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-21 16:00:49 +02:00
Santiago Pastorino
aacf2581cd
refactor evals and adds some __FILE__ and __LINE__
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-20 15:18:57 +02:00
Xavier Noria
7f07cc364a
Merge remote branch 'rails/master'
2010-05-19 23:29:39 +02:00
Neeraj Singh
39a246f545
Final iteration of use better testing methods
...
[#4652 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-19 21:31:51 +02:00
Santiago Pastorino
715f7c0b7c
Fixes a test on transaction_callbacks_test.rb
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-19 12:59:47 +02:00
Neeraj Singh
b462952886
Use better assertion methods for testing
...
[#4645 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-19 10:18:36 +02:00
Jeremy Kemper
223d6415d0
Revert "Don't carry default value when changing column for a binary type on MySQL"
...
Broke mysql tests.
This reverts commit edec1afe25 .
Conflicts:
activerecord/test/cases/migration_test.rb
[#3234 state:open]
2010-05-18 11:02:39 -07:00
Étienne Barrié
3809c80cd5
make add_index and remove_index more resilient; new rename_index method; track database limits
...
[#3452 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-18 10:55:41 -07:00
Santiago Pastorino
03c3d1eb84
Fixes transaction callbacks tests
...
[#4640 state:committed]
Signed-off-by: wycats <wycats@gmail.com >
2010-05-18 19:32:37 +04:00
Ian White
b439d85a19
Nested records (re: autosave) are now updated even when the intermediate parent record is unchanged [ #4242 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-18 16:13:00 +02:00
Neeraj Singh
ce20b93606
assert_equal should be used instead of assert
...
[#4629 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-18 16:13:00 +02:00
Neeraj Singh
0ef13afef5
expected value should come first in assert_equal
...
[#4630 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-18 16:13:00 +02:00
Pratik Naik
5ddc904941
Remove Model.clear_default_scope
2010-05-18 12:22:23 +01:00
José Valim
c536835957
Cut the fat and make session stores rely on request.cookie_jar and change set_session semantics to return the cookie value instead of a boolean.
2010-05-18 03:18:23 +02:00
Paco Guzman
c2fb8afaa0
Use assert_equal correctly in transaction callback tests (exposing some of them as broken)
...
[#4612 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-17 07:16:53 -07:00