aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | | Reset primary key sequence in FixturesResetPkSequenceTestsAlex Kitchens2017-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary key sequence for each test in FixturesResetPkSequenceTest is reset. The state in some of the FixturesResetPkSequenceTest tests are leaking, causing failurse in others. Using a seed of `48104`, the `FixturesResetPkSequenceTest#test_resets_to_min_pk_with_specified_pk_and_sequence` runs before the `DatabaseStatementsTest` tests, and the tests fail with duplicate primary key errors: ``` Run options: --seed 48104 -n "/^(?:FixturesResetPkSequenceTest#(?:test_resets_to_min_pk_with_specified_pk_and_sequence)|DatabaseStatementsTest#(?:test_create_should_return_the_inserted_id|test_exec_insert|test_insert_should_return_the_inserted_id))$/" .EEE 1) Error: DatabaseStatementsTest#test_exec_insert: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "accounts_pkey" DETAIL: Key (id)=(2) already exists. 2) Error: DatabaseStatementsTest#test_create_should_return_the_inserted_id: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "accounts_pkey" DETAIL: Key (id)=(3) already exists. 3) Error: DatabaseStatementsTest#test_insert_should_return_the_inserted_id: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "accounts_pkey" DETAIL: Key (id)=(4) already exists. ```
| * | | | | | | | | | Merge pull request #29298 from alexcameron89/minitest-59389Rafael França2017-05-311-0/+2
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Ensure fixtures are loaded for FoxyFixturesTest
| | * | | | | | | | | | Ensure fixtures are loaded for FoxyFixturesTestAlex Kitchens2017-05-311-0/+2
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the fixtures are properly loaded for FoxyFixturesTest When tests are randomized, FoxyFixturesTest often fails due to unloaded fixtures.
| * | | | | | | | | | Merge pull request #29291 from y-yagi/make_sure_to_disable_extension_after_testMatthew Draper2017-05-311-6/+2
| |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | | Make sure to disable extension after test
| | * | | | | | | | | Make sure to disable extension after testyuuji.yaginuma2017-05-311-6/+2
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If keep the extension, can not test properly to make sure that extension can be enabled.
| * | | | | | | | | Merge pull request #29277 from y-yagi/reset_time_zone_to_previous_valueKasper Timm Hansen2017-05-301-1/+8
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Reset time zone to previous value
| | * | | | | | | | | Reset time zone to previous valueyuuji.yaginuma2017-05-301-1/+8
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `CurrentAttributesTest` changed the global time zone, it is necessary to restore the original value after changing the test. The reproduction step: ``` ./bin/test -w --seed 5549 test/current_attributes_test.rb test/core_ext/date_ext_test.rb ```
| * | | | | | | | | Merge branch 'master' into unlock-minitestKasper Timm Hansen2017-05-29421-2199/+3517
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ Merge pull request #29071 from y-yagi/fix_default_scoping_testKasper Timm Hansen2017-05-281-0/+4
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Explicitly create necessary data for test
| | * | | | | | | | | | Explicitly create necessary data for testyuuji.yaginuma2017-05-131-0/+4
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DefaultScopingWithThreadTest` expects that there are two or more of `developers` data, but have not created data in the test. Therefore, tests may fail depending on execution order.
| * | | | | | | | | | Merge pull request #28954 from bogdanvlviv/set-proper-assertion-that-test-failedRafael França2017-05-021-1/+1
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Set proper assertion to be sure the test failed
| | * | | | | | | | | | Set proper assertion to be sure the test failedbogdanvlviv2017-05-021-1/+1
| |/ / / / / / / / / /
| * | | | | | | | | | Avoid stubing on this testRafael Mendonça França2017-04-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid to the test fail when running in isolation because the message generated is nil.
| * | | | | | | | | | Run ReloadModelTest in a different proccessRafael Mendonça França2017-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make sure it doesn't change the state of the current proccess when removing the owners constant.
| * | | | | | | | | | Only clean the connection of the current connection poolRafael Mendonça França2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid us to close the connection of the saved connection pool.
| * | | | | | | | | | New minitest 'assert false' messagePavel Valena2017-04-261-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Don't use same table between primary_keys tests and composite_primary_keys testsPrathamesh Sonpatki2017-04-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The test `PrimaryKeyAnyTypeTest#test_any_type_primary_key` was failing if ran after running all tests from `CompositePrimaryKeyTest`. - This was happening because `CompositePrimaryKeyTest` was changing the primary key of the barcodes table which was cached in schema cache. - As we were always going to drop the `barcodes` table at the end of tests in both `PrimaryKeyTest` and `CompositePrimaryKeyTest`, solved this issue by using different table name for tests in `CompositePrimaryKeyTest`.
| * | | | | | | | | | Fix one more test randomly failing due to array ordering issue on PG adapterPrathamesh Sonpatki2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduction command - ARCONN=postgresql be ruby -w -Itest test/cases/autosave_association_test.rb --seed 34101
| * | | | | | | | | | Fix the random failure of `test_create_resets_cached_counters`Prathamesh Sonpatki2017-04-262-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Tried specifying `id` for the `readers` records but it is interconnected with so many tests that many random tests started failing. - So switched to the approach of deleting all readers in the `create_resets_cached_counters` test.
| * | | | | | | | | | Fix random test failure of test_create_resets_cached_countersPrathamesh Sonpatki2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In earlier commit, I removed setting id manually for readers fixtures but that did not fix the randomly failing test_create_resets_cached_counters from has_many_associations tests. - Because the problem was with the `person_id` of the readers. As it is set to 1 in fixtures, if a post gets created with id 1 then that post automatically has 2 readers. - Fixed by removing the person_id.
| * | | | | | | | | | Don't add specific id's to the readers fixturesPrathamesh Sonpatki2017-04-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This causes failures in the `test_create_resets_cached_counters` from the has_many_associations tests because sometimes a Post record gets created with id as 1 so the readers records get associated with it and `person.readers` returns these 2 records instead of empty array. - Better to just remove the ids.
| * | | | | | | | | | Add minitest-bisect as part of the gemfileRafael Mendonça França2017-04-262-1/+10
| | | | | | | | | | |
| * | | | | | | | | | Release minitest lock so we can fix the order dependent testsRafael Mendonça França2017-04-262-5/+1
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #29777 from yui-knk/set_content_typeMatthew Draper2017-08-021-3/+2
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|/ / |/| | | | | | | | | | Refactoring `Response#charset=`
| * | | | | | | | | | Brush up local variables assignmentyui-knk2017-07-131-3/+2
| | | | | | | | | | |
| * | | | | | | | | | Use `#set_content_type` instead of `#set_header`yui-knk2017-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By this commit, `#set_header` is called only via `#set_content_type`. This commit makes the role of `#charset=` more clear.
* | | | | | | | | | | Merge pull request #29724 from eugeneius/sync_primary_keyMatthew Draper2017-08-024-5/+57
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / |/| | | | | | | | | | Sync transaction state when accessing primary key
| * | | | | | | | | | Sync transaction state when accessing primary keyEugene Kenny2017-07-094-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a record is modified inside a transaction, it must check the outcome of that transaction before accessing any state which would no longer be valid if it was rolled back. For example, consider a new record that was saved inside a transaction which was later rolled back: it should be restored to its previous state so that saving it again inserts a new row into the database instead of trying to update a row that no longer exists. The `id` and `id=` methods defined on the PrimaryKey module implement this correctly, but when a model uses a custom primary key, the reader and writer methods for that attribute must check the transaction state too. The `read_attribute` and `write_attribute` methods also need to check the transaction state when accessing the primary key.
* | | | | | | | | | | Merge pull request #30015 from larskanis/use-duktake-on-mingwGuillermo Iguaran2017-08-012-0/+4
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use duktape gem as default JS engine on Windows-MINGW
| * | | | | | | | | | | Use duktape gem as default JS engine on Windows-MINGW and MS-Visual-C buildsLars Kanis2017-08-012-0/+4
| | |_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fallback javascript engine on Windows is Windows Script Host (JScript). However this engine isn't able to process the default assets, because it supports ES3 only but the coffeescript compiler requires ES5. Fixes #30014
* | | | | | | | | | | Update working_with_javascript_in_rails.mdGuillermo Iguaran2017-08-011-1/+1
| | | | | | | | | | |
* | | | | | | | | | | Clarify route encoding testeileencodes2017-08-011-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this test changed in 9220935 I noticed that it really doesn't make sense anymore. I split the tests into 2 groups to explain what each one does. First these routes should throw a `bad_request` when the encoding isn't valid. We're expecting UTF8 encoding and passing binary, that should be a bad request. For the second test we are setting the `show` route to set `self.binary_params_for?` for that route which will convert the parameters and return a `:ok` instead of a `:bad_request`.
* | | | | | | | | | | Merge pull request #30023 from y-yagi/remove_unnecessary_doc_directory_deletionGuillermo Iguaran2017-08-012-2/+0
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary `doc` directory deletion
| * | | | | | | | | | | Remove unnecessary `doc` directory deletionyuuji.yaginuma2017-08-012-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 553b695, `doc` directory is not created in application.
* | | | | | | | | | | | Update working_with_javascript_in_rails.mdGuillermo Iguaran2017-08-011-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Path parameters should default to UTF8eileencodes2017-08-015-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the behavior such the path_params now default to UTF8 just like regular parameters. This also changes the behavior such that if a path parameter contains invalid UTF8 it returns a 400 bad request. Previously the behavior was to encode the path params as binary but that's not the same as query params. So this commit makes path params behave the same as query params. It's important to test with a path that's encoded as binary because that's how paths are encoded from the socket. The test that was altered was changed to make the behavior for bad encoding the same as query params. We want to treat path params the same as query params. The params in the test are invalid UTF8 so they should return a bad request. Fixes #29669 *Eileen M. Uchitelle, Aaron Patterson, & Tsukuru Tanimichi*
* | | | | | | | | | | | Merge pull request #30029 from yhirano55/fix_rails_command_commentsSean Griffin2017-08-011-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Fix rails_command comments
| * | | | | | | | | | | | [ci skip] Fix rails_command commentsYoshiyuki Hirano2017-08-011-3/+3
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #30021 from roberts1000/fix-rubocop-issuesRafael França2017-08-012-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix rubocop issues
| * | | | | | | | | | | | | Fix rubocop style issues in yarn and spring.rb templates"roberts10002017-07-312-3/+3
| | |/ / / / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #30024 from kamipo/remove_redundant_unless_branchSean Griffin2017-07-311-2/+0
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant `unless current_adapter?(:OracleAdapter)`
| * | | | | | | | | | | | | Remove redundant `unless current_adapter?(:OracleAdapter)`Ryuta Kamizono2017-07-281-2/+0
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Talk about bytes not charactersRafael Mendonça França2017-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Closes #30012
* | | | | | | | | | | | | | Add backticks around method [ci skip]Ryuta Kamizono2017-08-011-1/+1
| |/ / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And make reference to `Relation`.
* | | | | | | | | | | | | Merge pull request #30017 from bslobodin/fix-typo-in-assert-changesRafael França2017-07-311-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in assert_changes error message
| * | | | | | | | | | | | | fix typo in assert_changes error messageBoris Slobodin2017-07-311-1/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #30016 from ↵Guillermo Iguaran2017-07-315-0/+25
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | albertoalmagro/set-ruby-version-in-gemfile-and-ruby-version-by-default Set Ruby version in Gemfile and .ruby-version by default
| * | | | | | | | | | | | | Set Ruby version in Gemfile and .ruby-version by defaultAlberto Almagro2017-07-315-0/+25
|/ / / / / / / / / / / / /
* | | | | | | | | | | | | Merge pull request #29950 from MaxLap/avoid_or_clause_duplicatesSean Griffin2017-07-313-6/+66
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / |/| | | | | | | | | | | | Avoid duplicate clauses when using #or
| * | | | | | | | | | | | Edits following the reviewsMaxime Lapointe2017-07-282-27/+43
| | | | | | | | | | | | |