Project

General

Profile

« Previous | Next » 

Revision 23675

Fix tests after r23672 (#42545).

View differences:

trunk/test/functional/search_controller_test.rb
66 66
    assert_response :success
67 67

  
68 68
    assert_select '#search-results' do
69
      assert_select 'dt.issue a', :text => /Feature request #2/
69
      assert_select 'dt.issue a', :text => /Bug #1/
70 70
      assert_select 'dt.issue a', :text => /Bug #5/
71 71
      assert_select 'dt.changeset a', :text => /Revision 1/
72 72

  
73
      assert_select 'dt.issue a', :text => /Add ingredients categories/
74
      assert_select 'dd', :text => /should be classified by categories/
73
      assert_select 'dt.issue a', :text => /Cannot print recipes/
74
      assert_select 'dd', :text => /Unable to print/
75 75
    end
76 76

  
77 77
    assert_select '#search-results-counts' do
78
      assert_select 'a', :text => 'Changesets (5)'
78
      assert_select 'a', :text => 'Changesets (6)'
79
      assert_select 'a', :text => 'Issues (5)'
80
      assert_select 'a', :text => 'Projects (4)'
79 81
    end
80 82
  end
81 83

  
trunk/test/unit/changeset_test.rb
479 479
  end
480 480

  
481 481
  def test_next_nil
482
    changeset = Changeset.find_by_revision('10')
482
    changeset = Changeset.find_by_revision('11')
483 483
    assert_nil changeset.next
484 484
  end
485 485

  
trunk/test/unit/repository_test.rb
455 455
  def test_stats_by_author_reflect_changesets_and_changes
456 456
    repository = Repository.find(10)
457 457

  
458
    expected = {"Dave Lopper"=>{:commits_count=>10, :changes_count=>3}}
458
    expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>3}}
459 459
    assert_equal expected, repository.stats_by_author
460 460

  
461 461
    set = Changeset.create!(
......
467 467
    )
468 468
    Change.create!(:changeset => set, :action => 'A', :path => '/path/to/file1')
469 469
    Change.create!(:changeset => set, :action => 'A', :path => '/path/to/file2')
470
    expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>5}}
470
    expected = {"Dave Lopper"=>{:commits_count=>12, :changes_count=>5}}
471 471
    assert_equal expected, repository.stats_by_author
472 472
  end
473 473

  
......
476 476
    # to ensure things are dynamically linked to Users
477 477
    User.find_by_login("dlopper").update_attribute(:firstname, "Dave's")
478 478
    repository = Repository.find(10)
479
    expected = {"Dave's Lopper"=>{:commits_count=>10, :changes_count=>3}}
479
    expected = {"Dave's Lopper"=>{:commits_count=>11, :changes_count=>3}}
480 480
    assert_equal expected, repository.stats_by_author
481 481
  end
482 482

  
......
502 502
    # with committer="dlopper <[email protected]>"
503 503
    repository = Repository.find(10)
504 504

  
505
    expected = {"Dave Lopper"=>{:commits_count=>10, :changes_count=>3}}
505
    expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>3}}
506 506
    assert_equal expected, repository.stats_by_author
507 507

  
508 508
    set = Changeset.create!(
......
513 513
      :comments => 'Another commit by foo.'
514 514
    )
515 515

  
516
    expected = {"Dave Lopper"=>{:commits_count=>11, :changes_count=>3}}
516
    expected = {"Dave Lopper"=>{:commits_count=>12, :changes_count=>3}}
517 517
    assert_equal expected, repository.stats_by_author
518 518
  end
519 519

  

Also available in: Unified diff