When I configure a subscription block and check the option "Display previous issues" and leave the number set to "5", I don't see any issues displayed in the block. Am I missing something?

Files: 
CommentFileSizeAuthor
#14 simplenews-1524530-14.patch842 bytescorvus_ch
PASSED: [[SimpleTest]]: [MySQL] 1,752 pass(es).
[ View ]
#11 simplenews-1524530-11.patch3.5 KBcorvus_ch
PASSED: [[SimpleTest]]: [MySQL] 1,733 pass(es).
[ View ]
#2 simplenews-1524530-2.patch3.33 KBcorvus_ch
PASSED: [[SimpleTest]]: [MySQL] 1,732 pass(es).
[ View ]

Comments

Assigned:Unassigned» corvus_ch

Version:7.x-1.0-beta2» 7.x-1.x-dev
Status:Active» Needs review
StatusFileSize
new3.33 KB
PASSED: [[SimpleTest]]: [MySQL] 1,732 pass(es).
[ View ]

Steps taken to reproduce this bug:

  • I used a clean Drupal installation with latest Simplenews from git repository.
  • Cretaion of a new newsletter category.
  • Creation of a new newsletter in this category.
  • Added block for the newsletter category to the layout.
  • Send the created newsletter.

As a result, the sent newsletter was listed as recent issue. For me, it is not possible to reproduce the described behaviour. To verify this in code, I wrote some tests.

@bjlewis2: If you still can't get it running, pleas provide more Information about your environment. What steps did you follow in order to ending up with the behaviour you described?

Version:7.x-1.x-dev» 7.x-1.0-beta2

#2: simplenews-1524530-2.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, simplenews-1524530-2.patch, failed testing.

Version:7.x-1.0-beta2» 7.x-1.x-dev
Status:Needs work» Needs review

#2: simplenews-1524530-2.patch queued for re-testing.

Status:Needs review» Closed (works as designed)

Well, I'll be... must have been a stupid mistake on my part. Maybe I had only sent a test message or something... I don't know, but it sure is working. Sorry for wasting your time! ;(

Status:Closed (works as designed)» Needs review

Let's keep this at needs review, the patch adds test coverage for this which never hurts to have :)

Status:Needs review» Needs work

+++ b/tests/simplenews.testundefined
@@ -1154,14 +1163,46 @@ class SimpleNewsAdministrationTestCase extends SimplenewsTestCase {
     $this->drupalLogin($admin_user);
+    ¶
+    $this->setupSubscriptionBlock($edit_category->tid, $settings = array(
+      'issue count' => 2,
+      'previous issues' => 1,

Trailing spaces here and at the bottom.

+++ b/tests/simplenews.testundefined
@@ -1154,14 +1163,46 @@ class SimpleNewsAdministrationTestCase extends SimplenewsTestCase {
+    $this->drupalGet('/');

/ is not necessary here, you can use an empty string.

+++ b/tests/simplenews.testundefined
@@ -1154,14 +1163,46 @@ class SimpleNewsAdministrationTestCase extends SimplenewsTestCase {
+    foreach ($displayed_issues as $name) {
+      $this->assertTrue(in_array((string)$name, $generated_names));

This does not verify that they are actually the two most recent issues, could also be any combination of them.

Instead, try to explicitly verify that $generated_names[1] and ..[2] are there and ...[0] is not.

Status:Needs work» Needs review
StatusFileSize
new3.5 KB
PASSED: [[SimpleTest]]: [MySQL] 1,733 pass(es).
[ View ]

Status:Needs review» Fixed

Looks good, commited.

Priority:Normal» Major
Status:Fixed» Needs work

This is currently causing test failures.

We need to ensure that the three newsletters are created with a correct created timestamp.

Status:Needs work» Needs review
StatusFileSize
new842 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,752 pass(es).
[ View ]

Status:Needs review» Fixed

Thanks, commited. Overlooked the missing space and had already pushed, so fixed that in a separate commit.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.