Esempio n. 1
0
 def test_getcommentwithprefix_enabled_commitisattached_containsspecialchars_shouldreturnwithprefix(
         self):
     prefix = "PR-"
     configuration.config = Builder().setcommitmessageprefix(prefix)
     comment = "1338: VAT: VAT-Conditions defined with 0 % and 0 amount - reverse"
     expectedcomment = prefix + comment
     self.assertEqual(expectedcomment,
                      Commiter.getcommentwithprefix(comment))
Esempio n. 2
0
 def test_getcommentwithprefix_enabled_commitisattached_shouldreturnwithprefix(
         self):
     prefix = "APREFIX-"
     configuration.config = Builder().setcommitmessageprefix(prefix)
     comment = "1337: Upgrade to Wildfly - A comment"
     expectedcomment = prefix + comment
     self.assertEqual(expectedcomment,
                      Commiter.getcommentwithprefix(comment))
Esempio n. 3
0
 def test_getcommentwithprefix_enabled_commitisnotattachedtoanworkitem_shouldreturncommentwithoutprefix(self):
     configuration.config = Builder().setcommitmessageprefix("PR-")
     comment = "US1337: Fix some problems"
     self.assertEqual(comment, Commiter.getcommentwithprefix(comment))
Esempio n. 4
0
 def test_getcommentwithprefix_disabled_commitisattached_shouldreturncommentwithoutprefix(self):
     configuration.config = Builder().setcommitmessageprefix("")
     comment = "1337: Upgrade to Wildfly - A comment"
     self.assertEqual(comment, Commiter.getcommentwithprefix(comment))
Esempio n. 5
0
 def test_getcommentwithprefix_enabled_commitisattached_containsspecialchars_shouldreturnwithprefix(self):
     prefix = "PR-"
     configuration.config = Builder().setcommitmessageprefix(prefix)
     comment = "1338: VAT: VAT-Conditions defined with 0 % and 0 amount - reverse"
     expectedcomment = prefix + comment
     self.assertEqual(expectedcomment, Commiter.getcommentwithprefix(comment))
Esempio n. 6
0
 def test_getcommentwithprefix_enabled_commitisattached_shouldreturnwithprefix(self):
     prefix = "APREFIX-"
     configuration.config = Builder().setcommitmessageprefix(prefix)
     comment = "1337: Upgrade to Wildfly - A comment"
     expectedcomment = prefix + comment
     self.assertEqual(expectedcomment, Commiter.getcommentwithprefix(comment))