Changeset - bed929b24f63
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-07-21 14:08:08
marcin@python-works.com
fixed tests for search
- was written for just mercurial repo without having git
1 file changed with 17 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/tests/functional/test_search.py
Show inline comments
 
@@ -27,7 +27,7 @@ class TestSearchController(TestControlle
 
        self.log_user()
 
        response = self.app.get(url(controller='search', action='index'),
 
                                {'q': 'def repo'})
 
        response.mustcontain('10 results')
 
        response.mustcontain('39 results')
 

	
 
    def test_repo_search(self):
 
        self.log_user()
 
@@ -41,7 +41,7 @@ class TestSearchController(TestControlle
 
        response = self.app.get(url(controller='search', action='index'),
 
                                {'q': 'last:t', 'type': 'commit'})
 

	
 
        response.mustcontain('1 results')
 
        response.mustcontain('2 results')
 

	
 
    def test_search_commit_message(self):
 
        self.log_user()
 
@@ -49,6 +49,17 @@ class TestSearchController(TestControlle
 
                                {'q': 'bother to ask where to fetch repo during tests',
 
                                 'type': 'commit'})
 

	
 
        response.mustcontain('2 results')
 
        response.mustcontain('a00c1b6f5d7a6ae678fd553a8b81d92367f7ecf1')
 
        response.mustcontain('c6eb379775c578a95dad8ddab53f963b80894850')
 

	
 
    def test_search_commit_message_hg_repo(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='search', action='index',
 
                                    search_repo=HG_REPO),
 
                    {'q': 'bother to ask where to fetch repo during tests',
 
                     'type': 'commit'})
 

	
 
        response.mustcontain('1 results')
 
        response.mustcontain('a00c1b6f5d7a6ae678fd553a8b81d92367f7ecf1')
 

	
 
@@ -66,8 +77,11 @@ class TestSearchController(TestControlle
 
                                {'q': 'added:README.rst',
 
                                 'type': 'commit'})
 

	
 
        response.mustcontain('1 results')
 
        response.mustcontain('2 results')
 
        #HG
 
        response.mustcontain('3803844fdbd3b711175fc3da9bdacfcd6d29a6fb')
 
        #GIT
 
        response.mustcontain('ff7ca51e58c505fec0dd2491de52c622bb7a806b')
 

	
 
    def test_search_author(self):
 
        self.log_user()
0 comments (0 inline, 0 general)