| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
[ci skip] fix spelling of overridden
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Yves Senn & Matthew Draper]
The column check was embodied in the defaul index name.
If the :name option was used, the specified columns were not verified at all.
Given:
```
assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma)
```
That index could have been defined on any field, not necessarily on `:foo_id`.
|
| |
|
| |
|
|
|
|
|
| |
Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes
everyone's tests order dependent, which should never be done by the framework.
|
|
|
|
|
|
|
|
|
| |
Currently when we call id_was and we have a custom primary key name
Active Record will return the current value of the primary key. This
make impossible to correctly do an update operation if you change the
id.
Fixes #16413
|
|\
| |
| | |
Clarify Transaction responsibilities by breaking unneeded inheritance hierarchy.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Transaction class doesnt need to encapsulate the transaction state using
inheritance.
This removes all Transaction subclasses, and let the Transaction object
controls different actions based on its own state. Basically the only
actions would behave differently are `being`,`commit`,`rollback` as they
could act in a savepoint or in a real transaction.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
joker1007/fix_decimal_cast_from_float_with_large_precision
Fix type casting to Decimal from Float with large precision
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | | |
When I defines large precision column at RDBMS,
I assigns float value, raise ArgumentError (precision too large).
|
|\ \ \
| |_|/
|/| | |
rename MiniTest to Minitest
|
| | | |
|
|\ \ \
| | | |
| | | | |
Transactions refactoring - 2
|
| | |/
| |/| |
|
|/ /
| |
| |
| |
| |
| | |
This extracts the logic that was embedded in a Rake task into a static
method.
Bonus: the first test for `rake db:migrate`
|
|\ \
| | |
| | |
| | | |
Transactions refactoring
|
| | |
| | |
| | |
| | | |
Also add test to assets the savepoint name
|
| |/
|/| |
|
|/
|
|
| |
[Philippe Creux, Chris Teague]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the following issue:
1) Failure:
ActiveRecord::MySQLPurgeTest#test_establishes_connection_to_test_database [test/cases/tasks/mysql_rake_test.rb:200]:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: ActiveRecord::Base.establish_connection(:test)
satisfied expectations:
- allowed any number of times, invoked once: #<Mock:0x2349430>.recreate_database(any_parameters)
- allowed any number of times, invoked once: ActiveRecord::Base.establish_connection(any_parameters)
- allowed any number of times, invoked once: ActiveRecord::Base.connection(any_parameters)
|
|\
| |
| |
| |
| |
| | |
* Allow to specify a type for foreign key column in migrations
* unified the docs
* some cleanup in CHANGELOG
|
|/
|
|
| |
[Andrey Novikov & Łukasz Sarnacki]
|
|\
| |
| |
| |
| | |
zuhao/refactor_activerecord_nested_through_associations_test
Make sure assertion passes for postgresql.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
The fixtures are still in play, adding a new column without a default and `null: true`
is not possible. This reverts back to leaking global state, as our `schema.rb` adds
the `null: false` constraint on this field.
A future solution would be to make the `migration_test.rb` run independent of fixture tables.
This way we can simply drop the state after test execution, without worrying about side effects.
/cc @zuhao
|
|\
| |
| | |
Remove length limit that results failure in other tests.
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/test/abstract_unit.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.
This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.
Added FIXME notes to place that still need mocha removal
|
| |
| |
| |
| |
| |
| |
| |
| | |
Before this change, create_join_table would not remove the common prefix
in the join table name, unlike ActiveRecord::Reflections. A HABTM
between Music::Artist and Music::Record would use a table
music_artists_records, while create_join table would create
music_artists_music_records.
|
|\ \
| | |
| | |
| | | |
Dont swallow errors when bad alias_method
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
These tests were passing before because the precision were not using to
cast the value. Not it is being used so it would fail on sqlite3
|
|\ \ \
| | | |
| | | |
| | | | |
Fix rational to decimal on type_cast_from_user
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Revert "Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode"
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit babc24c1b07c1fd58b9b3249b0256f9b0d45c0f0.
Conflicts:
activerecord/test/cases/adapters/mysql/connection_test.rb
activerecord/test/cases/adapters/mysql2/connection_test.rb
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Treat invalid uuid as nil
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Implement required #encode_with
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
While running the spec `ARCONN=mysql2 ruby -v -Itest
test/cases/yaml_serialization_test.rb`
the following warning shows up:
`implementing to_yaml is deprecated, please implement "encode_with"`
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fixed a regression introduced in 84cf156
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
84cf156 (PR #15694) introduced a subtle regression. There are actually three
distinct entry points to creating an AR object – via .new (i.e. #initialize),
via #init_with (e.g. from YAML or database queries) and via .allocate.
With the patch in 84cf156, attribute methods and respond_to? will not work
correctly when objects are allocated directly, without going through either
The reason this test case didn't catch the regression was that the `Topic`
class is shared between test cases, so by the time this test case is ran the
attribute methods are very likely to be defined.
Switching to use a fresh anonymous class in the test to ensure we surface this
problem in the future.
|