diff --git a/rhodecode/tests/functional/test_changelog.py b/rhodecode/tests/functional/test_changelog.py
--- a/rhodecode/tests/functional/test_changelog.py
+++ b/rhodecode/tests/functional/test_changelog.py
@@ -11,23 +11,15 @@ class TestChangelogController(TestContro
response.mustcontain('''id="chg_20" class="container tablerow1"''')
response.mustcontain(
""""""
)
-
+ #rev 640: code garden
response.mustcontain(
- """r154:5e204e7583b9"""
+ """r640:0a4e54a44604"""
)
-
- response.mustcontain("""Small update at simplevcs app""")
-
-# response.mustcontain(
-# """
3
"""
-# )
+ response.mustcontain("""code garden""")
def test_index_pagination_hg(self):
self.log_user()
@@ -48,29 +40,15 @@ class TestChangelogController(TestContro
# Test response after pagination...
response.mustcontain(
""""""
)
response.mustcontain(
- """r64:46ad32a4f974"""
+ """r539:22baf968d547"""
)
-# response.mustcontain(
-# """21
"""
-# )
-#
-# response.mustcontain(
-# """"""
-# """46ad32a4f974""" % HG_REPO
-# )
-
def test_index_git(self):
self.log_user()
response = self.app.get(url(controller='changelog', action='index',
@@ -124,3 +102,52 @@ class TestChangelogController(TestContro
response.mustcontain(
"""r515:636ed213f2f1"""
)
+
+ def test_index_hg_with_filenode(self):
+ self.log_user()
+ response = self.app.get(url(controller='changelog', action='index',
+ revision='tip', f_path='/vcs/exceptions.py',
+ repo_name=HG_REPO))
+ #history commits messages
+ response.mustcontain('Added exceptions module, this time for real')
+ response.mustcontain('Added not implemented hg backend test case')
+ response.mustcontain('Added BaseChangeset class')
+ # Test response...
+
+ def test_index_git_with_filenode(self):
+ self.log_user()
+ response = self.app.get(url(controller='changelog', action='index',
+ revision='tip', f_path='/vcs/exceptions.py',
+ repo_name=GIT_REPO))
+ #history commits messages
+ response.mustcontain('Added exceptions module, this time for real')
+ response.mustcontain('Added not implemented hg backend test case')
+ response.mustcontain('Added BaseChangeset class')
+
+ def test_index_hg_with_filenode_that_is_dirnode(self):
+ self.log_user()
+ response = self.app.get(url(controller='changelog', action='index',
+ revision='tip', f_path='/tests',
+ repo_name=HG_REPO))
+ self.assertEqual(response.status, '302 Found')
+
+ def test_index_git_with_filenode_that_is_dirnode(self):
+ self.log_user()
+ response = self.app.get(url(controller='changelog', action='index',
+ revision='tip', f_path='/tests',
+ repo_name=GIT_REPO))
+ self.assertEqual(response.status, '302 Found')
+
+ def test_index_hg_with_filenode_not_existing(self):
+ self.log_user()
+ response = self.app.get(url(controller='changelog', action='index',
+ revision='tip', f_path='/wrong_path',
+ repo_name=HG_REPO))
+ self.assertEqual(response.status, '302 Found')
+
+ def test_index_git_with_filenode_not_existing(self):
+ self.log_user()
+ response = self.app.get(url(controller='changelog', action='index',
+ revision='tip', f_path='/wrong_path',
+ repo_name=GIT_REPO))
+ self.assertEqual(response.status, '302 Found')