Commit Graph

4552 Commits

Author SHA1 Message Date
Jean-Philippe Lang
b8a586c475 Fixed: LabelledFormBuilder#label outputs 2 label elements (#18679).
Patch by Masato NODA.

git-svn-id: http://svn.redmine.org/redmine/trunk@13786 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 20:19:39 +00:00
Jean-Philippe Lang
c0800b330c Error when adding user to group where he is already assigned (#18665).
git-svn-id: http://svn.redmine.org/redmine/trunk@13785 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 20:15:24 +00:00
Jean-Philippe Lang
7296b569a3 Leading slash required with Rails 4.2.
git-svn-id: http://svn.redmine.org/redmine/trunk@13783 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 15:05:18 +00:00
Jean-Philippe Lang
7ac9072270 Subclasses may not be loaded when running the test.
git-svn-id: http://svn.redmine.org/redmine/trunk@13782 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 12:50:43 +00:00
Jean-Philippe Lang
2a6692248b Replaced "can't" with "cannot" in error messages.
git-svn-id: http://svn.redmine.org/redmine/trunk@13781 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 12:39:48 +00:00
Jean-Philippe Lang
e2998505b2 PermissionsAttributeCoder.load called twice when mocha expectation is set.
git-svn-id: http://svn.redmine.org/redmine/trunk@13780 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 11:57:01 +00:00
Jean-Philippe Lang
8ed791d690 Use DOM assertion instead.
git-svn-id: http://svn.redmine.org/redmine/trunk@13779 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-21 11:48:00 +00:00
Jean-Philippe Lang
744ceaf61f Use DOM assertions as attributes order changes from a Rails version to another.
git-svn-id: http://svn.redmine.org/redmine/trunk@13778 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 14:41:04 +00:00
Jean-Philippe Lang
b1d2312dbf Make sure that themes are reloaded after test.
git-svn-id: http://svn.redmine.org/redmine/trunk@13777 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 14:33:17 +00:00
Jean-Philippe Lang
c32d75a697 Rewrites assertions.
git-svn-id: http://svn.redmine.org/redmine/trunk@13776 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 14:30:33 +00:00
Jean-Philippe Lang
f86d4940e1 Removed that quote in a fixture subject.
git-svn-id: http://svn.redmine.org/redmine/trunk@13775 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 14:22:50 +00:00
Jean-Philippe Lang
c6e8f537bd Removes test menu item after test.
git-svn-id: http://svn.redmine.org/redmine/trunk@13773 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 13:42:57 +00:00
Jean-Philippe Lang
49fdc5556b Set locale for error messages.
git-svn-id: http://svn.redmine.org/redmine/trunk@13772 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 13:35:57 +00:00
Jean-Philippe Lang
d4915f0635 Reset current user on each test.
git-svn-id: http://svn.redmine.org/redmine/trunk@13771 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-20 13:35:33 +00:00
Jean-Philippe Lang
30175bf85e Restore accent insensitive search with mysql (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13767 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-15 19:22:13 +00:00
Jean-Philippe Lang
64fea07aff Support for named route in project menu and a new :permission option (#6426).
git-svn-id: http://svn.redmine.org/redmine/trunk@13765 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-14 21:46:53 +00:00
Jean-Philippe Lang
90e16a35c5 Missing test helper (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13761 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-14 16:31:11 +00:00
Jean-Philippe Lang
261d989431 SQLite does not support case insensitive match for non-ASCII characters (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13760 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-14 16:30:36 +00:00
Jean-Philippe Lang
24ea953822 Use custom SQL for MySQL to behave like others DBMS: case-insensitive search without ignoring accentuation (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13759 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-14 13:55:52 +00:00
Toshi MARUYAMA
9c685f5034 add missing fixtures to test/unit/search_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13758 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-14 04:27:43 +00:00
Jean-Philippe Lang
6716bdf653 Mysql LIKE treats Ö and O the same (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13757 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 23:11:01 +00:00
Jean-Philippe Lang
6ad8ff4e13 Don't use #downcase on search tokens, let the database handle it (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13754 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 18:36:35 +00:00
Toshi MARUYAMA
8ec62e9507 add missing fixtures to SearchControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@13751 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 17:42:18 +00:00
Toshi MARUYAMA
e52ecb494b add missing fixture to MembersHelperTest
Test fails randomly.

<pre>
  1) Error:
MembersHelperTest#test_render_principals_for_new_members:
ActiveRecord::RecordInvalid: Validation failed: trackers is invalid, trackers is invalid, trackers is invalid
    test/object_helpers.rb:38:in `generate!'
    test/unit/helpers/members_helper_test.rb:29:in `test_render_principals_for_new_members'
</pre>

It can be reproduced on clean database and following change.

<pre>
-  fixtures :projects, :users, :members, :member_roles
+  fixtures :projects, :users, :members, :member_roles,
+           :trackers
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@13749 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 15:38:49 +00:00
Jean-Philippe Lang
453803c68f Don't consider roles without issue add/edit permissions for determining fields permissions (#15988).
git-svn-id: http://svn.redmine.org/redmine/trunk@13747 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 14:31:58 +00:00
Jean-Philippe Lang
07b44a4662 Droped legacy behaviour that allows a user to edit a few attributes of an issue without the edit_issues permission if a status transition is allowed (#15988).
Now that we can control permission on each field, this behaviour is no longer needed. The edit_issues permission is now required, which is consistent with the current requirements for bulk edition.

git-svn-id: http://svn.redmine.org/redmine/trunk@13746 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 14:01:56 +00:00
Jean-Philippe Lang
95f58c69d2 Misc tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13745 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 13:24:22 +00:00
Jean-Philippe Lang
ed1f13c97f Try to find out what causes a ruby bus error with ruby2.x on the CI server.
git-svn-id: http://svn.redmine.org/redmine/trunk@13743 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-13 11:02:28 +00:00
Jean-Philippe Lang
3b4f6038ff Adds a test for editing a registered user.
git-svn-id: http://svn.redmine.org/redmine/trunk@13742 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-12 21:40:25 +00:00
Jean-Philippe Lang
2fe806a4a4 Rewrites search engine to properly paginate results (#18631).
Instead of counting and retrieving results based on their timestamps, we now load all result ids then load the appropriate results by their ids. This also brings a 2x performance improvement as we search tokens in one of the 2 queries only.

git-svn-id: http://svn.redmine.org/redmine/trunk@13739 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-12 20:49:31 +00:00
Toshi MARUYAMA
963719042a ignore X-Autoreply mails (#15999, #13425)
Contributed by Karel Pičman.

git-svn-id: http://svn.redmine.org/redmine/trunk@13738 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-12 04:58:31 +00:00
Jean-Philippe Lang
0b1b46ae2c Revert r13736, test fails with mysql.
git-svn-id: http://svn.redmine.org/redmine/trunk@13737 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-11 21:12:06 +00:00
Jean-Philippe Lang
7bc3cf94cb Adds a test for search with limited results.
git-svn-id: http://svn.redmine.org/redmine/trunk@13736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-11 20:18:30 +00:00
Jean-Philippe Lang
d4ebbe5ba8 Adds some helpers tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13735 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-11 17:58:08 +00:00
Jean-Philippe Lang
fcf9cf7bb1 Misc tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13734 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-08 17:31:48 +00:00
Jean-Philippe Lang
95810125bf Don't create a journal when creating an issue with attachments.
git-svn-id: http://svn.redmine.org/redmine/trunk@13733 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-08 17:30:47 +00:00
Jean-Philippe Lang
2462a8581d Don't create a journal when creating an issue.
git-svn-id: http://svn.redmine.org/redmine/trunk@13732 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-08 17:18:28 +00:00
Jean-Philippe Lang
ee173b64b8 Misc tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13731 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-07 21:32:14 +00:00
Toshi MARUYAMA
b66e68dc82 fix ProjectNestedSetTest fails randomly
<pre>
  1) Error:
ProjectNestedSetTest#test_adding_a_root_to_first_position_should_update_nested_set_order:
ActiveRecord::RecordInvalid: Validation failed: trackers is invalid, trackers is invalid, trackers is invalid
    test/unit/project_nested_set_test.rb:27:in `setup'
</pre>

You can reproduce with following change.

<pre>
 class ProjectNestedSetTest < ActiveSupport::TestCase
+  fixtures :trackers
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@13730 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-07 04:36:47 +00:00
Jean-Philippe Lang
a8e3759458 Adds tests for Role#has_permissions?
git-svn-id: http://svn.redmine.org/redmine/trunk@13725 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-06 13:16:43 +00:00
Jean-Philippe Lang
43b3455111 Adds a test for Watcher.prune with :project option.
git-svn-id: http://svn.redmine.org/redmine/trunk@13724 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-06 13:09:48 +00:00
Jean-Philippe Lang
9c173375c6 Adds a test for #18584.
git-svn-id: http://svn.redmine.org/redmine/trunk@13722 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-06 11:19:54 +00:00
Jean-Philippe Lang
ca71cf3800 Adds methods for loading and adding settings.
git-svn-id: http://svn.redmine.org/redmine/trunk@13719 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 15:00:27 +00:00
Jean-Philippe Lang
c084ef509f Adds a few functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13718 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 12:38:48 +00:00
Jean-Philippe Lang
0cfbf9d449 Make sure that Redmine::Thumbnail.generate is called.
git-svn-id: http://svn.redmine.org/redmine/trunk@13714 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 12:22:35 +00:00
Jean-Philippe Lang
7c1445f19a Tab "New Issue" should not be displayed if a project has no trackers (#18571).
git-svn-id: http://svn.redmine.org/redmine/trunk@13713 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 12:17:20 +00:00
Jean-Philippe Lang
8323bc98f5 Adds tests for searching private or archived projects.
git-svn-id: http://svn.redmine.org/redmine/trunk@13710 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 08:48:29 +00:00
Jean-Philippe Lang
56edfcf6e9 Adds some Attachment tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13709 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 08:35:00 +00:00
Jean-Philippe Lang
89da75623d Adds a test for invalid enumeration class parameter.
git-svn-id: http://svn.redmine.org/redmine/trunk@13708 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 08:18:14 +00:00
Jean-Philippe Lang
c7653df32b Adds tests for invalid parameters.
git-svn-id: http://svn.redmine.org/redmine/trunk@13707 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-12-05 08:16:29 +00:00