diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-18 14:10:01 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-18 14:10:01 +0000 |
commit | 33ce711f9925d82c7b0321fbccd1427560ffb378 (patch) | |
tree | c3e8763a54d5c1350b83cd1ac10287e88be2cfb4 | |
parent | 5f29dd87b24960e7285cea6a9077762307db27d4 (diff) | |
download | redmine-33ce711f9925d82c7b0321fbccd1427560ffb378.tar.gz redmine-33ce711f9925d82c7b0321fbccd1427560ffb378.zip |
Fix tests after r23672 (#42545).
git-svn-id: https://svn.redmine.org/redmine/trunk@23675 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/search_controller_test.rb | 10 | ||||
-rw-r--r-- | test/unit/changeset_test.rb | 2 | ||||
-rw-r--r-- | test/unit/repository_test.rb | 10 |
3 files changed, 12 insertions, 10 deletions
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index 1a624c3c7..5e32e5656 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -66,16 +66,18 @@ class SearchControllerTest < Redmine::ControllerTest assert_response :success assert_select '#search-results' do - assert_select 'dt.issue a', :text => /Feature request #2/ + assert_select 'dt.issue a', :text => /Bug #1/ assert_select 'dt.issue a', :text => /Bug #5/ assert_select 'dt.changeset a', :text => /Revision 1/ - assert_select 'dt.issue a', :text => /Add ingredients categories/ - assert_select 'dd', :text => /should be classified by categories/ + assert_select 'dt.issue a', :text => /Cannot print recipes/ + assert_select 'dd', :text => /Unable to print/ end assert_select '#search-results-counts' do - assert_select 'a', :text => 'Changesets (5)' + assert_select 'a', :text => 'Changesets (6)' + assert_select 'a', :text => 'Issues (5)' + assert_select 'a', :text => 'Projects (4)' end end diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index ca1e010e3..3ad8b1cbf 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -479,7 +479,7 @@ class ChangesetTest < ActiveSupport::TestCase end def test_next_nil - changeset = Changeset.find_by_revision('10') + changeset = Changeset.find_by_revision('11') assert_nil changeset.next end diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 53b5e0ee7..84c22a73f 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -455,7 +455,7 @@ class RepositoryTest < ActiveSupport::TestCase def test_stats_by_author_reflect_changesets_and_changes repository = Repository.find(10) - expected = {"Dave Lopper"=>{:commits_count=>10, :changes_count=>3}} + expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>3}} assert_equal expected, repository.stats_by_author set = Changeset.create!( @@ -467,7 +467,7 @@ class RepositoryTest < ActiveSupport::TestCase ) Change.create!(:changeset => set, :action => 'A', :path => '/path/to/file1') Change.create!(:changeset => set, :action => 'A', :path => '/path/to/file2') - expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>5}} + expected = {"Dave Lopper"=>{:commits_count=>12, :changes_count=>5}} assert_equal expected, repository.stats_by_author end @@ -476,7 +476,7 @@ class RepositoryTest < ActiveSupport::TestCase # to ensure things are dynamically linked to Users User.find_by_login("dlopper").update_attribute(:firstname, "Dave's") repository = Repository.find(10) - expected = {"Dave's Lopper"=>{:commits_count=>10, :changes_count=>3}} + expected = {"Dave's Lopper"=>{:commits_count=>11, :changes_count=>3}} assert_equal expected, repository.stats_by_author end @@ -502,7 +502,7 @@ class RepositoryTest < ActiveSupport::TestCase # with committer="dlopper <dlopper@somefoo.net>" repository = Repository.find(10) - expected = {"Dave Lopper"=>{:commits_count=>10, :changes_count=>3}} + expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>3}} assert_equal expected, repository.stats_by_author set = Changeset.create!( @@ -513,7 +513,7 @@ class RepositoryTest < ActiveSupport::TestCase :comments => 'Another commit by foo.' ) - expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>3}} + expected = {"Dave Lopper"=>{:commits_count=>12, :changes_count=>3}} assert_equal expected, repository.stats_by_author end |