aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/confirmation_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29f"Rafael Mendonça França2019-08-021-1/+1
| | | | This reverts commit dd779c9686f49f5ed6dda8ad5a1cb3b0788e1dd4.
* No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29fAkira Matsuda2019-08-021-1/+1
|
* Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin blockRyuta Kamizono2018-12-211-18/+16
| | | | | | | | | | Currently we sometimes find a redundant begin block in code review (e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205). I'd like to enable `Style/RedundantBegin` cop to avoid that, since rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5 (https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with that situation than before.
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-14/+14
|
* Execute `ConfirmationValidator` validation when `_confirmation`'s value is ↵bogdanvlviv2017-11-051-0/+13
| | | | `false`
* Use frozen string literal in activemodel/Kir Shatrov2017-07-161-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-2/+2
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Fix broken alignments caused by auto-correct commit 411ccbdRyuta Kamizono2016-08-101-1/+2
| | | | Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-4/+2
|
* applies new string literal convention in activemodel/testXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add missing test for #17351Aditya Kapoor2015-09-011-0/+14
|
* Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-031-1/+0
| | | | onwards.
* Completely remove potential global state leaks in ActiveModel tests.Zuhao Wan2014-03-111-9/+9
| | | | ActiveModel tests can now be run in random order.
* Run ActiveModel test suites in random order.Zuhao Wan2014-03-101-6/+9
| | | | | | | | | | This gets the whole ActiveModel test suites working even if `self.i_suck_and_my_tests_are_order_dependent!` is disabled in `ActiveSupport::TestCase`. Two places are found that potentially leak global state. This patch makes sure states are restored so that none of the changes happen in a single test will be carried over to subsequence tests.
* Use the new clear_validators! api to reset validators in testsCarlos Antonio da Silva2014-01-271-2/+2
|
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-011-3/+3
| | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* `validates_confirmation_of` does not override writer methods.Yves Senn2013-03-041-0/+31
|
* Support i18n attributes for confirmationBrian Cardarella2012-04-241-1/+20
|
* confirmation validation error attributeBrian Cardarella2012-04-231-1/+1
| | | | | | | | | | | | This will render the error message on :#{attribute}_confirmation instead of on attribute itself. When rendering confirmation errors inline on the form with form builders such as SimpleForm and Formtastic it is confusing to the ender user to see the confirmation error message on the attribute element. Instead it makes more sense to have this validation error render on the confirmation field instead. The i18n message has been updated for the confirmation validator error message to include the original attribute name.
* removed AR from all AMo tests, including any unneeded files (schema, ↵Josh Kalderimis2010-05-091-2/+0
| | | | fixtures and test helper)
* removed an old unused model in the AMo tests which also removes another AR ↵Josh Kalderimis2010-05-091-1/+0
| | | | dependency
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-081-4/+4
| | | | individual validation tests and moved them to their own test file
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-22/+12
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Add ActiveModel::Validations tests for regular ruby classesPratik Naik2009-03-201-0/+17
|
* TestDatabase -> TestsDatabasePratik Naik2009-03-201-2/+2
|
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+51