diff --git a/tests/javascript_libraries.test b/tests/javascript_libraries.test
index 3b6b2e2..343b328 100644
--- a/tests/javascript_libraries.test
+++ b/tests/javascript_libraries.test
@@ -92,6 +92,15 @@ class JavaScriptLibrariesCustomTestCase extends DrupalWebTestCase {
     $this->assertEqual($result->code, 200, t('Fetched JS.'));
     $this->drupalSetContent($result->data);
     $this->assertRaw($uniq_id);
+   // Code copied from hook_cron.
+    $custom = variable_get('javascript_libraries_custom_libraries', array());
+    foreach ($custom as $library) {
+      // Get/build local cached versions of external scripts.
+      if ($library['type'] == 'external' && !empty($library['cache'])) {
+        $path = javascript_libraries_cache($library['uri'], TRUE);
+        $this->assertTrue(!empty($path), $library['uri'] . ' was cached and returned a file path');
+      }
+    }
   }
 }
 
