aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Add test missed by a03ea684efc3505647cf0327a501aa2dbb591ad2Sean Griffin2014-12-221-2/+3
|
* Use the new `foreign_key` option on `references` in generatorsSean Griffin2014-12-222-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes `rails g model Post user:references` from def change create_table :posts do |t| t.references :user, index: true end add_foreign_key :posts, :users end to def change create_table :posts do |t| t.references :user, index: true, foreign_key: true end end Changes `rails g migration add_user_to_posts user:references` from def change add_reference :posts, :users, index: true add_foreign_key :posts, :users end to def change add_reference :posts, :users, index: true, foreign_key: true end
* Skip byebug on all non-MRI rubies, fix testsSean Griffin2014-12-222-2/+2
| | | | | | The changes in #18149 added tests for the app generator, but only fixed it for the plugin generator (I should have let CI finish though I think it would have failed as an allowed failure).
* Only add debugger/byebug if on MRIArthur Neves2014-12-221-1/+1
|
* Merge pull request #18100 from chancancode/serve_static_filesGodfrey Chan2014-12-195-6/+62
| | | | | | Allow static asset serving from env variable (enhanced!) Conflicts: railties/CHANGELOG.md
* `db:structure:load` and `db:schema:load` no longer purge the database.Yves Senn2014-12-181-0/+25
| | | | | | | | | | | | | | | | | Closes #17945 `db:test:prepare` still purges the database to always keep the test database in a consistent state. This patch introduces new problems with `db:schema:load`. Prior to the introduction of foreign-keys, we could run this file against a non-empty database. Since every `create_table` containted the `force: true` option, this would recreate tables when loading the schema. However with foreign-keys in place, `force: true` wont work anymore and the task will crash. /cc @schneems
* Fix Duplicate web-console entries in GemfileNorimasaAndo2014-12-141-0/+18
|
* Merge pull request #17896 from GBH/globbing_route_mailer_previewRafael Mendonça França2014-12-081-0/+11
|\ | | | | fixing mailer previews for apps with globbing route
| * fixing mailer previews for apps with globbing routeOleg2014-12-031-0/+11
| |
* | Merge pull request #17953 from kirs/test-activejob-generatorRafael Mendonça França2014-12-081-0/+29
|\ \ | | | | | | Test coverage for ActiveJob generator
| * | Test coverage for ActiveJob generatorKir Shatrov2014-12-071-0/+29
| | |
* | | Merge pull request #17797 from y-yagi/donot_delete_mailer_layoutsRafael Mendonça França2014-12-041-0/+15
|\ \ \ | | | | | | | | Don't remove mailer layouts files
| * | | Don't remove mailer layouts filesyuuji.yaginuma2014-11-271-0/+15
| | | |
* | | | Removed use of mocha in the info_controller testsPrathamesh Sonpatki2014-12-031-5/+4
| |_|/ |/| |
* | | Fix "nonexistent" typo in testsMelissa Xie2014-12-021-1/+1
| | |
* | | Silence Minitest for plugin tests.Guo Xiang Tan2014-12-021-0/+1
| |/ |/| | | | | | | | | | | | | Fixes https://github.com/rails/rails/issues/17340. Use Minitest::BacktraceFilter instead of removing all silencers. This will allow the backtrace for all libraries in the plugin to be shown while removing noise generated by Minitest's backtrace.
* | Merge pull request #17866 from bogdan/default-form-builderSantiago Pastorino2014-12-011-0/+39
|\ \ | | | | | | Bugfix config.action_view.default_form_builder option
| * | Bugfix config.action_view.default_form_builder optionBogdan Gusiev2014-12-011-0/+39
| |/
* | Merge pull request #17823 from byroot/fix-mount-rack-apps-with-asSean Griffin2014-11-291-0/+20
|\ \ | | | | | | Pure rack apps can be mounted with a name
| * | Pure rack apps can be mounted with a nameJean Boussier2014-11-291-0/+20
| |/ | | | | | | See https://github.com/rails/rails/commit/9b15828b5c347395b42066a588c88e5eb4e72279#commitcomment-8764492
* / Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|/
* Generators add foreign keys on referencesDerek Prior2014-11-252-1/+46
| | | | | | | | | | | If you run a generator such as: ``` rails generate model accounts supplier:references ``` The resulting migration will now add the corresponding foreign key constraint unless the reference was specified to be polymorphic.
* bring back `db:test:prepare`.Yves Senn2014-11-252-9/+92
| | | | | | | | | | | | | | | This reverts deprecations added in #13528. The task is brought back for two reasons: 1. Give plugins a way to hook into the test database initialization process 2. Give the user a way to force a test database synchronization While `test:prepare` is still a dependency of every test task, `db:test:prepare` no longer hooks into it. This means that `test:prepare` runs before the schema is synchronized. Plugins, which insert data can now hook into `db:test:prepare`. The automatic schema maintenance can't detect when a migration is rolled-back, modified and reapplied. In this case the user has to fall back to `db:test:prepare` to force the synchronization to happen.
* tests, run `test_test.rb` with `RAILS_ENV=test`.Yves Senn2014-11-251-1/+1
| | | | | | The tests to verify our testing setup used `RAILS_ENV=development` to execute the tests. Let's keep it as close to a real-world setup as possible.
* Added tests for log_level deprecationGodfrey Chan2014-11-251-13/+18
| | | | | | Closes #17756 [Godfrey Chan, Zachary Scott]
* Set the test_order in the basic app as well, see 58e8b48Godfrey Chan2014-11-252-0/+26
| | | | This removes the unwanted deprecation warnings in the tests
* Set the default log_level to info in all testsGodfrey Chan2014-11-251-0/+1
| | | | | | | | | This is a follow-up to 116de07. That change was for two reasons: 1) speed up the tests by reducing the amount of log lines 2) avoid a deprecation warning from a6de6f5. This setting need to be on the basic app too, otherwise the deprecation warning will show up on other unrelated test cases.
* Merge pull request #17757 from zzak/railties-default-to-debug-log_levelGodfrey Chan2014-11-251-0/+1
|\ | | | | Always default the log_level to :info for Railties
| * Always default the log_level to :info for RailtiesZachary Scott2014-11-241-0/+1
| |
* | Generate mailer layouts even if no action is given.Guo Xiang Tan2014-11-251-0/+2
| |
* | Add tests which were incorrectly removed.Guo Xiang Tan2014-11-252-0/+6
| |
* | Creates an ApplicationMailer and layout by default, including html and body ↵Andy Jeffries2014-11-212-10/+22
|/ | | | tags to reduce spam score
* :scissors:Rafael Mendonça França2014-11-101-1/+1
|
* No need to sync config.secret_token and secrets.secret_tokenRafael Mendonça França2014-11-101-34/+2
| | | | Just prefer secrets over config
* Merge pull request #16535 from bf4/patch-1Rafael Mendonça França2014-11-104-11/+150
|\ | | | | | | Allow fallback to LegacyKeyGenerator when secret_key_base is not set but secrets.secret_token is
| * `secret_token` is now saved in `Rails.application.secrets.secret_token`Benjamin Fleischer2014-11-024-11/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `secrets.secret_token` is now used in all places `config.secret_token` was - `secrets.secret_token`, when not present in `config/secrets.yml`, now falls back to the value of `config.secret_token` - when `secrets.secret_token` is set, it over-writes `config.secret_token` so they are the same (for backwards-compatibility) - Update docs to reference app.secrets in all places - Remove references to `config.secret_token`, `config.secret_key_base` - Warn that missing secret_key_base is deprecated - Add tests for secret_token, key_generator, and message_verifier - the legacy key generator is used with the message verifier when secrets.secret_key_base is blank and secret_token is set - app.key_generator raises when neither secrets.secret_key_base nor secret_token are set - app.env_config raises when neither secrets.secret_key_base nor secret_token are set - Add changelog Run focused tests via ruby -w -Itest test/application/configuration_test.rb -n '/secret_|key_/'
* | add lib to $LOAD_PATH on application inhertence. fixes #17106Aaron Patterson2014-11-041-1/+2
| |
* | add a test for #17106Aaron Patterson2014-11-042-0/+22
| |
* | Revert "Replace String index juggling with Pathname goodness in ↵yuuji.yaginuma2014-11-021-0/+10
|/ | | | | | | | db:fixtures:load" This reverts commit 482fdad5ef8a73688b50bba3991dd4ef6f286edd. Fixes #17237.
* Merge pull request #17408 from bf4/fix_rbx_testYves Senn2014-10-281-1/+1
|\ | | | | Fix rbx generated Gemfile regex
| * Fix rbx generated Gemfile regexBenjamin Fleischer2014-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | https://travis-ci.org/rails/rails/jobs/39190983#L460 1) Failure: AppGeneratorTest#test_psych_gem [test/generators/app_generator_test.rb:495]: Expected /gem 'psych',\s+'~> 2.0', \s+platforms: :rbx/ to match <snip> http://git.io/uuLVag)\ngem 'psych', '~> 2.0', platforms: :rbx\n\n
* | Merge pull request #16229 from byroot/stop-swallowing-url-generation-errorsAndrew White2014-10-271-0/+15
|\ \ | |/ |/| UrlGenerationError are not catched as 404 anymore
| * UrlGenerationError are not catched as 404 anymoreJean Boussier2014-10-271-0/+15
| |
* | Add back --skip-turbolinks and remove --skip-gemsRafael Mendonça França2014-10-261-3/+2
|/ | | | | | | For the most part of cases --skip-gems option just remove one line in the Gemfile. This is not worth for the complexity it adds. Closes #17196
* :nail_care: it's -> its (see comments on 9a586ac)Godfrey Chan2014-10-181-1/+1
|
* [ci skip] A Rails engine is not a man :ok_woman:Zachary Scott2014-10-181-1/+1
|
* test, `Generators::GeneratedAttribute` with references, required, index.Yves Senn2014-10-161-0/+8
| | | | | | | | | | | | | Closes #17197. Closes #17207. `{required}` is a type modifier so it should be: user:references{required}:index and not: user:references:index{required}
* Don't need to account turbolinks cookies in get request.Rafael Mendonça França2014-10-131-6/+6
| | | | | | | It was changed to not set the cookie in get requests at https://github.com/rails/turbolinks/commit/62cc3db457ad9745ccda047dd43ab84fb3d89707. Related with dcb05f26.
* fix test_helper for mountable pluginmasarakki2014-10-131-0/+4
|
* Remove unused codeRafael Mendonça França2014-09-251-12/+1
|