summaryrefslogtreecommitdiff
path: root/modules/upload/upload.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-16 22:05:51 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-16 22:05:51 +0000
commit18d22419f3da39ca4bf92f46d605a25957f311be (patch)
treed72732b1a23d479c4f2adc4d671d8ec901e2a187 /modules/upload/upload.test
parent9fe9144ae7804e3b80c0ffd8444b0448261f4436 (diff)
downloadbrdo-18d22419f3da39ca4bf92f46d605a25957f311be.tar.gz
brdo-18d22419f3da39ca4bf92f46d605a25957f311be.tar.bz2
- Patch #339929 by Moshe et al: move node links into ->content.
Diffstat (limited to 'modules/upload/upload.test')
-rw-r--r--modules/upload/upload.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/upload/upload.test b/modules/upload/upload.test
index 1a3438844..a39f0ac96 100644
--- a/modules/upload/upload.test
+++ b/modules/upload/upload.test
@@ -44,12 +44,17 @@ class UploadTestCase extends DrupalWebTestCase {
$this->uploadFile($node, $files[0]);
$this->uploadFile($node, $files[1]);
- // Check to see that uploaded file is listed and actually accessible.
+ // Check to see that uploaded file is listed in detail page and actually accessible.
$this->assertText(basename($files[0]), basename($files[0]) . ' found on node.');
$this->assertText(basename($files[1]), basename($files[1]) . ' found on node.');
$this->checkUploadedFile(basename($files[0]));
$this->checkUploadedFile(basename($files[1]));
+
+ // Assure that the attachment link appears on teaser view and has correct count.
+ $node = node_load($node->nid);
+ $teaser = node_view($node, TRUE);
+ $this->assertTrue(strpos($teaser, format_plural(2, '1 attachment', '@count attachments')), 'Attachments link found on node teaser.');
// Fetch db record and use fid to rename and delete file.
$upload = db_fetch_object(db_query('SELECT fid, description FROM {upload} WHERE nid = %d', array($node->nid)));