aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
Commit message (Collapse)AuthorAgeFilesLines
* working against arel/collector branchAaron Patterson2014-04-091-3/+3
|
* Merge branch 'master' into adequaterecordAaron Patterson2014-04-0720-320/+548
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (122 commits) Rails.application should be set inside before_configuration hook remove check for present? from delete_all Remove useless begin..end Build the reverse_order on its proper method. Use connection-specific bytea escaping Ignore order when doing count. make enums distinct per class Remove unused `subclass_controller_with_flash_type_bar` var from flash test. fix CollectionProxy delete_all documentation Added OS X specific commands to installation guide [ci skip] Recommended using homebrew for installing MySQL and PostgreSQL Fix setup of adding _flash_types test. Use SVG version of travis build status badge [skip ci] W3C CSP document moved to gihub.io URL [ci skip] sprockets-rails was released Fix the test defining the models in the right place Add CHANGELOG entry for #11650 [ci skip] Declare the assets dependency Use sass-rails 4.0.3 Make possible to use sprockets-rails 2.1 add missing parentheses to validates_with documentation [skip ci] ...
| * Use connection-specific bytea escapingMatthew Draper2014-04-081-0/+17
| | | | | | | | | | | | | | | | | | | | In our normal usage, it's rare for this to make a difference... but is more technically correct. As well as a spec that proves this is a good idea, let's also add a more sane-looking one that just covers basic to_sql functionality. There aren't many places where we actually use escape_bytea, but that's one that won't be going away.
| * Merge pull request #14579 from senny/pg/remove_string_limitRafael Mendonça França2014-04-041-1/+1
| |\ | | | | | | | | | | | | | | | | | | PostgreSQL, remove varchar limit. Conflicts: activerecord/CHANGELOG.md
| | * PostgreSQL and SQLite, remove varchar limit. [Vladimir Sazhin & Toms Mikoss ↵Yves Senn2014-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | & Yves Senn] There is no reason for the PG adapter to have a default limit of 255 on :string columns. See this snippet from the PG docs: Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.
| * | Prevent state leak in test.Guo Xiang Tan2014-04-031-17/+16
| |/ | | | | | | This will allow us to run the tests in random order.
| * Merge pull request #14569 from matthewd/sqlite_relative_deprecatedRafael Mendonça França2014-04-031-2/+2
| |\ | | | | | | | | | | | | | | | | | | Revise 'sqlite3:' URL handling for smoother upgrades Conflicts: activerecord/CHANGELOG.md
| | * Revise 'sqlite3:' URL handling for smoother upgradesMatthew Draper2014-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll change to the absolute-path interpretation in 4.2. The current "correct" spellings for in-memory, relative, and absolute URLs, respectively, are: sqlite3::memory: sqlite3:relative/path sqlite3:/full/path Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce. Uncovered by @guilleiguaran while investigating #14495, though that sounds like a different issue.
| * | Merge pull request #14561 from tgxworld/refactor_run_without_connectionYves Senn2014-04-038-56/+30
| |\ \ | | | | | | | | Add ConnectionHelper to refactor tests.
| | * | Add ConnectionHelper to refactor tests.Guo Xiang Tan2014-04-038-56/+30
| | |/
| * / Treat blank UUID values as nilDmitry Lavrov2014-04-031-0/+5
| |/
| * PostgreSQL, Support for materialized views. [Dave Lee & Yves Senn]Dave Lee2014-04-021-8/+26
| | | | | | | | | | Expand the query used in #table_exists? to include materialized views in the kinds of relations it searches.
| * cleanup, `reset_pg_session` in range_test.rbYves Senn2014-04-021-2/+5
| | | | | | | | | | Also do not use transactional fixtures. We drop the type and the table after every run, so there is nothing for the transaction to clean up.
| * Allow postgresql enum_test to be run in random order.Guo Xiang Tan2014-04-012-9/+13
| | | | | | | | Creating and dropping similar tables within the same connection causes postgresql to look up old values in the cache of tables which have already been dropped.
| * PostgreSQL, register custom domains. Closes #14305.Yves Senn2014-04-011-0/+53
| | | | | | | | | | | | | | This patch registers custom domains in our OID-type_map. They will behave exactly as the type specified by `pg_type.typbasetype`. /cc @matthewd
| * PostgreSQL determine `Column#type` through corresponding OID. #7814Yves Senn2014-04-012-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | I ran the whole test suite and compared the old to the new types. Following is the list of types that did change with this patch: ``` DIFFERENT TYPE FOR mood: NEW: enum, BEFORE: DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float ``` The `floatrange` is a custom type. The old type `float` was simply a coincidence form the name `floatrange` and our type-guessing.
| * fix bug on non empty defaults for pg array columnsLuke Steensen2014-03-301-0/+11
| | | | | | | | fixes #10613
| * Refactor test to use DdlHelper.Guo Xiang Tan2014-03-291-166/+197
| | | | | | | | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14400 This ensures that all tables are removed after each test and thereby allowing us to run the tests in a random order.
| * Fix tests not unsubscribing from Notifications.Guo Xiang Tan2014-03-283-6/+6
| | | | | | | | See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
| * PostgreSQL, use `PostgreSQLColumn` in PG specific tests.Yves Senn2014-03-281-8/+8
| |
| * PostgreSQL, test-cases to lock down column default values.Yves Senn2014-03-283-0/+33
| |
| * PostgreSQL, test cases to lock the current column types.Yves Senn2014-03-288-15/+68
| |
| * only run citext_test if the connection supports_extensions?.Yves Senn2014-03-271-52/+54
| | | | | | | | This will keep the test suite passing with older PG installations.
| * No need to use begin/end blocksRafael Mendonça França2014-03-262-16/+16
| |
| * No need to gsub the stringRafael Mendonça França2014-03-262-2/+2
| |
| * Fixes bugs for using indexes in CREATE TABLE by adding checks for table ↵Steve Rice2014-03-252-4/+8
| | | | | | | | | | | | | | | | existence Also: - updates tests by stubbing table_exists? method - adds entry for creating indexes in CREATE TABLE to changelog
| * create indexes inline in CREATE TABLE for MySQLCody Cutrer2014-03-252-0/+22
| | | | | | | | | | | | | | | | This is important, because adding an index on a temporary table after it has been created would commit the transaction Conflicts: activerecord/CHANGELOG.md
* | Merge branch 'master' into adequaterecordAaron Patterson2014-03-2523-117/+196
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (96 commits) clarify CHANGELOG [ci skip]. Fix Generation of proper migration when ActiveRecord::Base.pluralize_table_names = false. update comments to reflect that options support is not available synchronize changelogs and 4.1 release notes. [ci skip] do not rely on method_missing hitting arel use ARel factory methods for building AST nodes Fix date_select option overwriting html classes - Rename `increment_or_decrement` to an apt `set_cache_value` since it actually doesn't increment/decrement in localstore. Check if any sqlite files are not included in the gitignore Remove sqlite3 lines from .gitignore if the application is not using sqlite3. Adding active_model in Rails::Info Clean up tables after each test. Swapped parameters of assert_equal in assert_select Update test helper to use latest Digestor API Digestor should just rely on the finder to know about the format and the variant -- trying to pass it back in makes a mess of things (oh, and doesnt work) Log the full path, including variant, that the digestor is trying to find Fix for digestor to consider variants for partials -- this still needs more testing!! fix log_tags request object grammar Extract with_example_table into helper method. test for structure:dump without schema information table. refs eafec46 ... Conflicts: activerecord/test/cases/relation/where_chain_test.rb
| * Clean up tables after each test.Guo Xiang Tan2014-03-222-92/+96
| | | | | | | | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14400 This ensures that all tables are removed after each test and thereby allowing us to run the tests in a random order.
| * Extract with_example_table into helper method.Guo Xiang Tan2014-03-201-6/+5
| | | | | | | | This setups the helper method which other tests can benefit from.
| * Postgres schema: Constrain sequence search classidJosh Williams2014-03-201-0/+45
| | | | | | | | | | | | | | | | | | | | | | The pk_an_sequence_for query previously joined against pg_class's oid for rows in pg_depend, but pg_depend's objid may point to other system tables, such as pg_attrdef. If a row in one of those other tables coincidentally has the same oid as an (unrelated) sequence, that sequence name may be returned instead of the real one. This ensures that only the pg_depend entries pointing to pg_class are considered.
| * Teach PostgreSQLAdapter#reset! to actually resetMatthew Draper2014-03-181-0/+31
| | | | | | | | It wasn't doing anything beyond clearing the statement cache.
| * Use teardown helper method.Guo Xiang Tan2014-03-1419-19/+19
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'master' into adequaterecordAaron Patterson2014-03-136-5/+155
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (108 commits) make tests pass on Ruby 2.2 Use Sqlite3 adapter in examples use the body proxy to freeze headers just ask the response for the commit status, we do not need to ask the jar only write the jar if the response isn't committed Fix a grammatical error in the i18n guide [ci skip] use method_defined? to check whether or not a method is defined Enhance docs for update_attribute [ci-skip] Change usec to 0 on tests that compare seconds Unit test for mysql quote time usec Changelog entry for mysql56 microseconds Test microsecond on mysql 5.6 MySQL 5.6 and later supports microsecond precision in datetime. [ci skip] Add documentation for original_fullpath. Remove mocking on save, when not necessary comment why we are modifying global state. [ci skip] `change_table` supports `citext`. Follow up to #12523. Removed unnecessary command "application" register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester] Fixes STI when 2+ levels deep. ...
| * Unit test for mysql quote time usecArthur Neves2014-03-121-0/+7
| |
| * Merge pull request #13040 from kamipo/case_sensitive_comparisonRafael Mendonça França2014-03-122-4/+44
| |\ | | | | | | | | | | | | | | | | | | Only use BINARY for mysql case sensitive uniqueness check when column has a case insensitive collation. Conflicts: activerecord/CHANGELOG.md
| | * Only use BINARY for mysql case sensitive uniqueness check when column has a ↵Ryuta Kamizono2013-11-262-4/+44
| | | | | | | | | | | | case insensitive collation.
| * | `change_table` supports `citext`. Follow up to #12523.Yves Senn2014-03-111-8/+27
| | |
| * | register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester]lsylvester2014-03-111-0/+58
| | | | | | | | | | | | citext makes it possible to use AR Hash finders for case-insensitive matching as sql UPPER/LOWER functions are not needed.
| * | Inline block to fix indent [ci skip]Carlos Antonio da Silva2014-03-041-3/+1
| | |
| * | Fix enum test unused variable warning.Vipul A M2014-03-041-1/+1
| | | | | | | | | | | | Related - https://github.com/rails/rails/commit/5c55aafd38f45ac019573f98438ffdbdc8c580f9
| * | Add Enum type to postgresql adapter's oids to prevent unknown OID warnings.Dieter Komendera2014-03-041-0/+28
| | |
| * | Fix warnings due to:Vipul A M2014-03-031-1/+1
| | | | | | | | | | | | | | | - unused variable in PG Adapter. - Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-02-264-90/+206
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (55 commits) [ci skip] Move association class method notes extract common code in `uuid_test.rb`. move PostgreSQL UUID tests from `datatype_test.rb` to `uuid_test.rb`. [ci skip] remove guide section on models in migrations test case for custom PostgreSQL enum type. Remove inclusion of rubysl gem for rbx on generated Gemfile let `insert_record` actuall save the object. [skip ci] Fix test name typo in app generator tests. travis s/2.1.0/2.1.1 Bump version of bcrypt gem Skip test_migrate_revert_add_index_with_name if databases do not allow to create duplicate indexes on the same columns Optimize getting started guide images, and use png instead of jpg :scissors: [ci skip] Point master changelogs to 4-1-stable branch Add missing parantheses in index_exists? `ActionDispatch::Head` was replaced by `Rack::Head`. Closes #14191. [skip ci] Standardized punctuation. [skip ci] Fix typo in link_to :method option description refactor, with_locale is not needed because I18n is mocked. Fix ActionView label translation for more than 10 nested elements ...
| * | extract common code in `uuid_test.rb`.Yves Senn2014-02-261-60/+57
| | |
| * | move PostgreSQL UUID tests from `datatype_test.rb` to `uuid_test.rb`.Yves Senn2014-02-262-16/+36
| | |
| * | test case for custom PostgreSQL enum type.Yves Senn2014-02-261-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test currently outputs the following warning: ``` unknown OID: current_mood(3567879) (SELECT "postgresql_enums".* FROM "postgresql_enums" ORDER BY "postgresql_enums"."id" ASC LIMIT 1) unknown OID: current_mood(3567879) (SELECT "postgresql_enums".* FROM "postgresql_enums" WHERE "postgresql_enums"."id" = $1 LIMIT 1) ``` We have an open PR to deal with this issue. It will dynamically register the OID for enum columns. This test case is merely to exhibit the current behavior of PostgreSQL enum columns.
| * | deprecate support for pg ranges with excluding beginnings.Yves Senn2014-02-231-23/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ruby Range object does not support excluding beginnings. We currently support excluding beginnings for some subtypes using manually by incrementing them (now using the `#succ` method). This is approach is flawed as it's not equal to an excluding beginning. This commit deprecates the current support for excluding beginnings. It also raises an `ArgumentError` for subtypes that do not implement the `succ` method. This is a temporary solution to get rid of the broken state. We might still add complete support for excluding beginnings afterwards. (Probably with a new `PGRange` object, which acts like a `Range` but has excluding beginnings.
| * | dynamically define PostgreSQL OID range types.Yves Senn2014-02-231-11/+40
| | | | | | | | | | | | | | | | | | | | | | | | This gets AR working with custom defined range types. It also removes the need for subtype specific branches in `OID::Range`. This expands the interface of all `OID` types with the `infinity` method. It's responsible to provide a value for positive and negative infinity.
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-02-181-0/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (32 commits) Typo fix for unscope Use the reference for the mime type to get the format Preparing for 4.1.0.beta2 release Correctly escape PostgreSQL arrays. Escape format, negative_format and units options of number helpers Sync 4.1 release notes with changes since 7f648bc7 [ci skip] Update upgrading guide regarding `render :text` Add `#no_content_type` attribute to `AD::Response` Add missing CHANGELOG entry to Action View Update guides for new rendering options Cleanup `ActionController::Rendering` Fix a fragile test on `action_view/render` Introduce `render :html` for render HTML string Introduce `render :plain` for render plain text Update hash format for render_text_test Introduce `render :body` for render raw content Don't use `# =>` when it is not the expression values Fix the column name [ci skip] Document the default scopes change on the release notes, CHANGELOG and upgrating guides Move changelog entry to the top, fix examples indent [ci skip] ...