aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/serialized_attribute_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update some bad test cases for serialized columnsSean Griffin2014-05-301-53/+17
| | | | | | | | | | | | The first case was not testing what the issue mentioned actually was (A subclass of a class with serialized attributes does not serialize when they come from the database). The second case was a bad coder. It would fail if the model was `dup`ed, or if the the model was loaded from the database and then saved again. The third case wasn't testing anything that wasn't covered by the second (and was also a bad coder for the same reasons as the second).
* Refactor serialized types to be partially defined as custom propertiesSean Griffin2014-05-291-10/+0
| | | | | | | Many of the methods defined in `AttributeMethods::Serialization` can be refactored onto this type as well, but this is a reasonable small step. Removes the `Type` class, and the need for `decorate_columns` to handle serialized types.
* Fix serialized field returning serialized data after update_columnSimon Eskildsen2014-04-051-0/+16
|
* Use teardown helper method.Guo Xiang Tan2014-03-141-2/+1
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* prevent global timezone state from leaking out of test cases.Yves Senn2013-10-251-8/+7
|
* Remove unnecessary loopVipul A M2013-09-131-5/+2
|
* Perf: avoid dupes add fallback logic for codersSam2013-09-111-1/+1
|
* Remove instance level serialized_attributes setting was deprecated.kennyj2013-06-021-6/+0
|
* Fix typo in serialized_attribute_test. [ci skip]Max Edmands2013-04-281-1/+1
|
* Added testcase for #10067 and a CHANGELOG entry about this change.kennyj2013-04-251-0/+14
|
* test case for `serialize` default values.Yves Senn2013-03-071-0/+7
| | | | Closes #9110
* Serialized attribute can be serialized in an integer columnRafael Mendonça França2012-12-211-1/+10
| | | | Fix #8575
* Fix decorating columns for serialized attributesitzki2012-12-101-0/+13
|
* Fix `attributes_before_type_cast` for serialised attributes.Nikita Afanasenko2012-10-311-3/+13
| | | | Public method `attributes_before_type_cast` used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like `read_attribute_before_type_cast` and returns unserialised values.
* Add test to ensure that save will raise SerializationTypeMismatch if theRafael Mendonça França2012-08-261-0/+6
| | | | serialized attribute value is not from the same class
* We don't need this reloadRafael Mendonça França2012-08-261-1/+1
|
* Use the Topic class in the attribute serialized testsRafael Mendonça França2012-08-261-8/+4
|
* Use teardown hook to return the initial state of the objectRafael Mendonça França2012-08-261-16/+5
|
* Move the serialized attribute tests to their own fileRafael Mendonça França2012-08-261-0/+214