1. Simon Meers
  2. django-markitup

Commits

Sergey Fursov  committed abc1f06

failed tests for issue #12

  • Participants
  • Parent commits 2a24424
  • Branches default

Comments (0)

Files changed (1)

File tests/tests.py

View file
  • Ignore whitespace
         ('/some/path/jquery.min.js', '/some/path/jquery.min.js'),
         ('http://www.example.com/jquery.min.js', 'http://www.example.com/jquery.min.js'),
         ('https://www.example.com/jquery.min.js', 'https://www.example.com/jquery.min.js'),
+        (None, None)
         )
 
 
         try:
             for url, link in self.jquery_urls:
                 settings.JQUERY_URL = url
-                self.assertIn(link, self._get_js())
+                if url:
+                    self.assertIn(link, self._get_js())
+                else:
+                    self.assertIsNone(self._get_js())
         finally:
             settings.JQUERY_URL = _old_jquery_url
 
             self.assertIn(link, self._get_css(markitup_skin=miu_skin))
 
 
+    def test_jquery_in_media(self):
+        for url, link in self.jquery_urls:
+            settings.JQUERY_URL = url
+            if url:
+                self.assertIn(link, self._get_js())
+            else:
+                settings.JQUERY_URL = 'jquery.min.js'
+                self.assertNotIn('/static/jquery.min.js', self._get_js())
 
 try:
     from south.modelsinspector import introspector