aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | | 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
| | | | | | | | | | | |
| * | | | | | | | | | | Avoid duplicate clauses when using #orMaxime Lapointe2017-07-253-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Condenses the clauses that are common to both sides of the OR and put them outside, before the OR This fix the current behavior where the number of conditions is exponential based on the number of times #or is used.
* | | | | | | | | | | | Merge pull request #30001 from y-yagi/fix_test_directoryKasper Timm Hansen2017-07-303-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fix test directory to correct path
| * | | | | | | | | | | | Fix test directory to correct pathyuuji.yaginuma2017-07-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Together, fix to the following lint violation. ``` rails/actionview/test/ujs/public/test/data-confirm.js 303:11 error Strings must use singlequote quotes rails/actionview/test/ujs/public/test/data-remote.js 414:32 error Extra semicolon semi ✖ 2 problems (2 errors, 0 warnings) ```
* | | | | | | | | | | | | Merge pull request #29951 from georgeclaghorn/action-view-test-flowKasper Timm Hansen2017-07-302-0/+10
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix testing helpers that use Action View's capturing helpers (e.g. content_for)
| * | | | | | | | | | | | | Fix testing helpers that use Action View's capturing helpers (e.g. content_for)George Claghorn2017-07-252-0/+10
| | |/ / / / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Fix github user output.Kasper Timm Hansen2017-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Orhan Toy & Kasper Timm Hansen ]
* | | | | | | | | | | | | Merge pull request #29963 from y-yagi/fix_ruby_warningsKasper Timm Hansen2017-07-301-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix `warning: method redefined;`
| * | | | | | | | | | | | | Fix `warning: method redefined;`yuuji.yaginuma2017-07-281-3/+3
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning: ``` /tmp/d20170727-7039-kmdtb1/app/app/models/user.rb:5: warning: method redefined; discarding old model_name rails/activemodel/lib/active_model/naming.rb:222: warning: previous definition of model_name was here ```
* | | | | | | | | | | | | Merge pull request #30002 from y-yagi/change_http_postgresql_links_to_httpsVipul A M2017-07-308-32/+32
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / |/| | | | | | | | | | | | Change http postgresql.org links to https [ci skip]