Jay Pignata
7213da37ce
Fix test_has_many_through_polymorphic_has_one on sqlite2 [ #3054 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-15 19:14:32 -07:00
Pratik Naik
0a558b36eb
Add tests for hm:t#push failures
2009-08-11 02:37:04 +01:00
Pratik Naik
d0f891ae02
Rewrite hm:t#create tests using assert_no_difference and assert_difference
2009-08-10 21:30:44 +01:00
Arthur Zapparoli
55b5cf586a
Fixed typo in test name and CHANGELOG [ #3017 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 16:13:18 +01:00
Cristi Balan
3e35ba2481
Add tests for scoping schema_migrations index by global table prefix and suffix
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:59:04 -07:00
Leonardo Borges
0c391b46fb
PostgreSQL: XML datatype support
...
[#1874 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:24:54 -07:00
Jaime Bellmyer
9c1bac0b7f
raises an exception on habtm join table inserts if join table contains a primary key. Caches this check to save time on subsequent inserts.
...
[#2086 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:19:18 -07:00
Jaime Bellmyer
f0602214e0
raises exception (ActiveRecord::ConfigurationError with message) on habtm association creation if join table contains a primary key
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:17:39 -07:00
Morgan Schweers
d2d464e26e
Fix that creating a table whose primary key prefix type is :table_name generates an incorrectly pluralized primary key.
...
[#872 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 21:57:56 -07:00
Jeremy Kemper
47f7c936a2
Fix test dependency on taggings
2009-08-09 21:30:55 -07:00
Gabe da Silveira
7e3364ac46
Fix that counter_cache breaks with has_many :dependent => :nullify.
...
[#1196 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 21:18:16 -07:00
Jatinder Singh
5704ecffad
AR should respect default values for MySQL BINARY and VARBINARY columns.
...
[#1273 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 21:05:26 -07:00
railsbob
e06a0b03c8
has_many :through create should not raise validation errors
...
[#2934 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 18:44:45 -07:00
Tristan Dunn
a0f69722be
Allow ho:through#build when the owner is a new record [ #1749 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:46:16 +01:00
Tristan Dunn
0472839d68
Prevent overwriting of table name in merging SQL conditions [ #2949 state:resolved]
2009-08-10 00:41:36 +01:00
Gabe da Silveira
00d6c76660
Enable has_many :through for going through a has_one association on the join model [ #2719 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:30:44 +01:00
Arthur Zapparoli
810b59a2a9
Removed duplicated tests [ #3026 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:08:40 +01:00
Arthur Zapparoli
ce2422ceaf
Model#human_attribute_name now accept symbols [ #3025 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 23:55:54 +01:00
Vladimir Meremyanin
08ec22054f
Make sure association conditions work with :include and :joins [ #358 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 23:10:23 +01:00
Tristan Dunn
1af9bd58a0
No longer require database name for MySQL to allow cross database selects.
...
[#1122 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 14:35:57 -07:00
Joshua Nichols
0ec64bea92
Added back support for destroying an association's object by id. [ #2306 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 21:46:52 +01:00
Hugo Peixoto
870750ed4b
With multiparameter date attributes, the behaviour when empty fields are present is now coherent with the one described in the date_select documentation.
...
[#1715 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 13:39:47 -07:00
Elise Huard
c5896bfd84
validate uniqueness with limit in utf8
...
[#2653 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 12:50:04 -07:00
Jeremy Kemper
db42f1bf67
Fix standalone test missing developer fixture
2009-08-09 11:58:07 -07:00
Hugo Peixoto
ff60ec469f
Added a uniqueness validation test that uses diacritics.
...
[#2883 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 11:51:58 -07:00
railsbob
076ca48bd6
Ensure hm:t#find does not assign nil to :include [ #1845 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 17:02:19 +01:00
Mike Breen
7d254b5d74
Serialized attributes should only be saved with partial_updates when the serialized attribute is present [ #2397 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 16:34:53 +01:00
Dmitry Ratnikov
314ba0433f
Changed to use klass instead of constantizing in assign_ids generated method
...
[#260 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:52:06 -07:00
Dmitry Ratnikov
f16008afdd
Modified Rich Bradley's test-case to fail as part of suite and with a reasonable message
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:40:27 -07:00
Rich Bradley
9bb8ef9ede
Fix for nested :include with namespaced models.
...
[#260 state:committed]
2009-08-09 00:31:46 -07:00
Tristan Dunn
791cccaeda
Don't define a default primary key in the schema dumper.
...
[#1908 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 19:31:35 -07:00
Rob
4b7f95eb8b
Fix binary fixture test on Windows
...
[#2597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 19:18:38 -07:00
Matt Duncan
3b3798506b
Adding :from scoping to ActiveRecord calculations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1229 state:committed]
2009-08-09 12:43:07 +12:00
Pratik Naik
761283ffdb
Ensure hm:t#create/create! throws ActiveRecord::RecordNotSaved when the owner is new
2009-08-08 21:51:33 +01:00
Cristi Balan
7f84f14efa
Add rake db:forward - opposite of db:rollback [ #768 state:resolved]
...
Example:
rake db:forward # performs the next migration
rake db:forward STEP=4 # performs the next 4 migrations
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 17:41:43 +01:00
Wolfram Arnold
73f2d37505
Add test to verify that the new :inverse_of association option will indeed fix the validation problem for a belongs_to relationship that validates_presence_of the parent, when both the parent and the child are new (in-memory) records. Also check that this works when the parents adds child via nested_attributes_for.
...
Lastly, add a require 'models/pet' to association_validation_test.rb, so that test can be run independently (was failing due to that missing dependency). [#2815 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-08 13:07:49 +02:00
Josh Sharpe
54e7f5ba43
Tidy up the AR tests, removing duplicates and making tests clearer / more focussed.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2774 state:committed]
2009-08-08 14:53:35 +12:00
Jeremy Kemper
019ed5a7c0
Don't rely on T::U::TestCase#name
2009-08-07 17:04:19 -07:00
Jeremy Kemper
06afa48c8c
Merge branch 'oracle_enhanced'
2009-08-07 11:58:45 -07:00
José Valim
7034272354
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
2009-08-07 17:16:16 +02:00
Raimonds Simanovskis
5f0c425e8d
Some databases (e.g. Oracle) does not allow "AS" between table name and table alias name, for others it is optional
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
53be10c5e6
fixed test_foreign_key_violations_are_translated_to_specific_exception to work with Oracle
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
9b2309c4a8
fix schema_dumper_test for Oracle as it supports precision up to 38
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
8afab34a76
always sort lists by id before comparison to avoid errors because of different sorting of same results (on Oracle database)
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
01a4e07c36
Oracle can store integers with any :limit
2009-08-06 23:41:00 +03:00
Raimonds Simanovskis
04e6bc1134
Oracle adapter recourns count() as numeric (not string)
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
5d0dece6a6
Oracle adapter gets Time or DateTime value already with timezone
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
ee654e54c4
Oracle generates different ORDER BY fragment
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
3a1cbc5c3b
Oracle adapter returns Time value for DATE columns
2009-08-06 23:40:59 +03:00
Raimonds Simanovskis
42fd2a3b16
added :order to find :all as otherwise Oracle tests were failing
2009-08-06 23:40:59 +03:00