Changeset - 481f64dbe85c
[Not reviewed]
default
0 1 0
Søren Løvborg - 9 years ago 2017-02-10 20:30:44
sorenl@unity3d.com
tests: tighten TestHomeController matching/description

'<span class="repotag">git' does not actually appear in JS, so move it
above the comment saying so. For the rest, tighten the checks to
actually ensure they match JS, and not e.g. the same text in plain
HTML elsewhere on the page.
1 file changed with 7 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/functional/test_home.py
Show inline comments
 
@@ -16,18 +16,20 @@ class TestHomeController(TestController)
 
        response = self.app.get(url(controller='home', action='index'))
 
        #if global permission is set
 
        response.mustcontain('Add Repository')
 

	
 
        response.mustcontain('<span class="repotag">git')
 

	
 
        # html in javascript variable:
 
        response.mustcontain('var data = {"totalRecords": %s' % Repository.query().count())
 
        response.mustcontain(r'href=\"/%s\"' % HG_REPO)
 

	
 
        response.mustcontain(r'<span class="repotag">git')
 
        response.mustcontain(r'<i class=\"icon-globe\"')
 

	
 
        response.mustcontain("""fixes issue with having custom format for git-log""")
 
        response.mustcontain("""/%s/changeset/5f2c6ee195929b0be80749243c18121c9864a3b3""" % GIT_REPO)
 
        response.mustcontain(r'\"fixes issue with having custom format for git-log\n\"')
 
        response.mustcontain(r'\"/%s/changeset/5f2c6ee195929b0be80749243c18121c9864a3b3\"' % GIT_REPO)
 

	
 
        response.mustcontain("""disable security checks on hg clone for travis""")
 
        response.mustcontain("""/%s/changeset/96507bd11ecc815ebc6270fdf6db110928c09c1e""" % HG_REPO)
 
        response.mustcontain(r'\"disable security checks on hg clone for travis\"')
 
        response.mustcontain(r'\"/%s/changeset/96507bd11ecc815ebc6270fdf6db110928c09c1e\"' % HG_REPO)
 

	
 
    def test_repo_summary_with_anonymous_access_disabled(self):
 
        with fixture.anon_access(False):
0 comments (0 inline, 0 general)