Commits

Yuya Nishihara committed beeb014

fold functional-by-nodeid.diff by toshi

  • Participants
  • Parent commits 93965dd

Comments (0)

Files changed (1)

File hg-use-scmid.patch/find-changeset.diff

    # Returns the latest changesets for +path+; sorted by revision number
    def latest_changesets(path, rev, limit=10)
      if path.blank?
+diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
+--- a/test/functional/repositories_mercurial_controller_test.rb
++++ b/test/functional/repositories_mercurial_controller_test.rb
+@@ -75,6 +75,14 @@ class RepositoriesMercurialControllerTes
+       assert_equal ['delete.png'], assigns(:entries).collect(&:name)
+     end
+     
++    def test_show_at_given_nodeid
++      get :show, :id => 3, :path => ['images'], :rev => '0885933ad4f6'
++      assert_response :success
++      assert_template 'show'
++      assert_not_nil assigns(:entries)
++      assert_equal ['delete.png'], assigns(:entries).collect(&:name)
++    end
++
+     def test_changes
+       get :changes, :id => 3, :path => ['images', 'edit.png']
+       assert_response :success
 diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb
 --- a/test/unit/repository_mercurial_test.rb
 +++ b/test/unit/repository_mercurial_test.rb