aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
Commit message (Collapse)AuthorAgeFilesLines
...
* | Whitespace :heart: and hash syntax changeRafael Mendonça França2013-02-201-23/+22
| |
* | descriptive error message when AR adapter was not found. Closes #7313.Yves Senn2013-02-201-0/+9
| |
* | delete duplicated tests in AR base_test.rbTakehiro Adachi2013-02-191-23/+0
| | | | | | | | These are duplicated with the tests which are in relations_test.rb
* | add tests for ActiveRecord::Base#createTakehiro Adachi2013-02-181-0/+8
| |
* | Revert "checking in the abstractions for valid type checking:"Jon Leighton2013-02-153-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c321b309a9a90bbfa0912832c11b3fef52e71840. Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb Reason: failing test 1) Error: test_valid_column(ActiveRecord::ConnectionAdapters::SQLite3AdapterTest): NoMethodError: undefined method `column' for test/cases/adapters/sqlite3/sqlite3_adapter_test.rb:29:in `test_valid_column'
* | don't cache invalid subsets when preloading hmt associations.Yves Senn2013-02-141-0/+6
| | | | | | | | closes #8423.
* | Don't call after_commit when creating through an association and save fails, ↵James Miller2013-02-131-0/+27
| | | | | | | | fixes #5802
* | Merge pull request #9204 from ranjaykrishna/col-probAaron Patterson2013-02-123-0/+27
|\ \ | | | | | | schema dumper tests now conducted by ActiveRecord::Base.Connection
| * | checking in the abstractions for valid type checking:Ranjay Krishna2013-02-123-0/+27
| | |
* | | test for regression from a712e08ebe21f6d8653a0e6602df2e0f5d40d9caAaron Patterson2013-02-111-0/+6
| | |
* | | define Active Record Store accessors in a moduleSergey Nartimov2013-02-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow store accessors to be overrided like other attribute methods, e.g.: class User < ActiveRecord::Base store :settings, accessors: [ :color, :homepage ], coder: JSON def color super || 'red' end end
* | | fixing bit string testAaron Patterson2013-02-101-3/+3
| | |
* | | Reverting e170014113 (Change behaviour with empty hash in where clause)Guillermo Iguaran2013-02-081-6/+2
| | |
* | | Reverting 16f6f25 (Change behaviour with empty array in where clause)Guillermo Iguaran2013-02-083-6/+12
| | |
* | | Change behaviour with empty array in where clauserobertomiranda2013-02-083-12/+6
| | |
* | | Change behaviour with empty hash in where clauserobertomiranda2013-02-081-2/+6
| | |
* | | Merge pull request #9207 from dylanahsmith/mysql-quote-numericGuillermo Iguaran2013-02-073-10/+35
|\ \ \ | | | | | | | | active_record: Quote numeric values compared to string columns.
| * | | active_record: Quote numeric values compared to string columns.Dylan Smith2013-02-073-10/+35
| | | |
* | | | Skip schema dumper extensions test if connection does not support itCarlos Antonio da Silva2013-02-071-0/+1
|/ / / | | | | | | | | | | | | Travis failed because the postgresql version installed there does not support extensions, so we just need to skip this for now.
* | | Run schema dumper extensions without creating real extensionsCarlos Antonio da Silva2013-02-061-9/+2
| | | | | | | | | | | | | | | There is no need to create the extension in the database just to test if it's dumped, we can stub that instead.
* | | Do not print anything related to extensions when they don't none existCarlos Antonio da Silva2013-02-061-0/+10
| | | | | | | | | | | | | | | When extensions are supported but there's no one enabled in the database, we should not print anything related to them in schema.rb.
* | | improve tests to check for existence of extensions method, and skip testing ↵Justin George2013-02-062-8/+8
| | | | | | | | | | | | dumped extensions if they are unsupported by the database
* | | Add some tests to enumerate how extensions should be stored in the schema outputJustin George2013-02-062-0/+15
| | |
* | | Enable hstore extensions on tests if it is not enabled and database supports itRafael Mendonça França2013-02-051-1/+8
| | |
* | | DATABASE_URL parsing should turn numeric strings into numeric types, andAaron Stone2013-01-311-11/+37
| | | | | | | | | | | | | | | | | | the strings true and false into boolean types, in order to match how YAML would parse the same values from database.yml and prevent unexpected type errors in the database adapters.
* | | Merge pull request #9119 from dazuma/database_tasks_for_unknown_adapterCarlos Antonio da Silva2013-01-311-0/+6
|\ \ \ | | | | | | | | Raise an exception with a useful message if a rake task is requested for an unknown adapter
| * | | Raise a specific exception with a useful message if a rake task is requested ↵Daniel Azuma2013-01-301-0/+6
| | | | | | | | | | | | | | | | for an unknown adapter
* | | | class_eval should use __FILE__ and __LINE__Neeraj Singh2013-01-301-1/+1
|/ / /
* | / add API to pg for enabling / disabling hstoreAaron Patterson2013-01-281-7/+29
| |/ |/|
* | Use Encoding::UTF_8 constant :do_not_litter:Akira Matsuda2013-01-282-2/+2
| |
* | Prevent Relation#merge from collapsing wheres on the RHSJon Leighton2013-01-272-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused a bug with the new associations implementation, because now association conditions are represented as Arel nodes internally right up to when the whole thing gets turned to SQL. In Rails 3.2, association conditions get turned to raw SQL early on, which prevents Relation#merge from interfering. The current implementation was buggy when a default_scope existed on the target model, since we would basically end up doing: default_scope.merge(association_scope) If default_scope contained a where(foo: 'a') and association_scope contained a where(foo: 'b').where(foo: 'c') then the merger would see that the same column is representated on both sides of the merge and collapse the wheres to all but the last: where(foo: 'c') Now, the RHS of the merge is left alone. Fixes #8990
* | Fix cases where delete_records on a has_many association caused errorsDerek Kraan2013-01-271-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | because of an ambiguous column name. This happened if the association model had a default scope that referenced a third table, and the third table also referenced the original table (with an identical foreign_key). Mysql requires that ambiguous columns are deambiguated by using the full table.column syntax. Postgresql and Sqlite use a different syntax for updates altogether (and don't tolerate table.name syntax), so the fix requires always including the full table.column and discarding it later for Sqlite and Postgresql.
* | Fix handling of dirty time zone aware attributesLilibeth De La Cruz2013-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when `time_zone_aware_attributes` were enabled, after changing a datetime or timestamp attribute and then changing it back to the original value, `changed_attributes` still tracked the attribute as changed. This caused `[attribute]_changed?` and `changed?` methods to return true incorrectly. Example: in_time_zone 'Paris' do order = Order.new original_time = Time.local(2012, 10, 10) order.shipped_at = original_time order.save order.changed? # => false # changing value order.shipped_at = Time.local(2013, 1, 1) order.changed? # => true # reverting to original value order.shipped_at = original_time order.changed? # => false, used to return true end
* | `#count` in conjunction with `#uniq` performs distinct count.Yves Senn2013-01-261-0/+4
| | | | | | | | closes #6865
* | Remove obsolete test fileJon Leighton2013-01-251-35/+0
| | | | | | | | https://github.com/rails/rails/commit/4beb4dececcf10c642c74fbcb8548c833e921a86#commitcomment-2482869
* | reduce the number of queries on IN clauses, fix relation queries in `where`Aaron Patterson2013-01-241-1/+14
| |
* | Set Thread.abort_on_exception for the whole AS, AP, and AR testsAkira Matsuda + Koichi Sasada2013-01-241-0/+2
| | | | | | | | this would give us some more clues in case a test silently dies inside Thread
* | Fix PostgreSQL tests on TravisAndrew White2013-01-241-10/+31
| | | | | | | | Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
* | Add postgresql range types supportbUg2013-01-232-106/+281
| |
* | A test case name needs to start with "test_"Akira Matsuda2013-01-231-1/+1
| |
* | Revert "Round usec when writing timestamp attribute."Andrew White2013-01-221-15/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit e9d2ad395ec2ef929d74752f3d71c80674044fbe. Closes #8460 Conflicts: activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb activerecord/test/cases/dirty_test.rb
* | Add failing test case for #8460Andrew White2013-01-221-0/+14
| | | | | | | | Add a test case to ensure that fractional second updates are detected.
* | Whitespaces :scissors:Rafael Mendonça França2013-01-221-7/+4
| | | | | | | | [ci skip]
* | Reset SchemaMigration after updatingAkira Matsuda2013-01-221-0/+1
| |
* | Preload some join table schemasAkira Matsuda2013-01-221-0/+9
| |
* | Be sure to clear schema cacheAkira Matsuda2013-01-221-0/+3
| |
* | Reset table_name_{prefix,suffix}, and table_name after each testAkira Matsuda2013-01-221-11/+4
| | | | | | | | because some tests were not resetting them, and thus the tests were order dependent
* | Missing repair_validationsAkira Matsuda2013-01-221-12/+14
| |
* | Refactored transaction state into its own object. Each transaction creates a ↵wangjohn2013-01-211-2/+10
| | | | | | | | new transaction state object upon initialization.
* | Remove extra sort from testVipul A M2013-01-211-3/+3
| | | | | | | | Cleanup change_schema tests to remove extra sorts on columns.