We need to test the automatic closing of polls after a certain specified date/time.
Suggested assertions:
- Poll is initially active.
- Poll is still active after cron runs when it has not reached expiry point.
- Poll is inactive after cron runs after it has reached expiry point.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 295990_poll_expiration.patch | 3.75 KB | mr.baileys |
| #9 | issue-295990.patch | 4.02 KB | lilou |
| #5 | poll_autoexpire_1.patch | 3.73 KB | mr.baileys |
| #3 | poll_autoexpire.patch | 3.71 KB | mr.baileys |
Comments
Comment #1
r.villetet commentedI'm interested in testing this testcase
Comment #2
mr.baileysComment #3
mr.baileysAttached is a test case for the poll auto-expire functionality. There's a slight bit of hacking required to change the "created" timestamp on the poll node so we can test expiration.
Comment #4
catchThis looks great, the hack is entirely necessary, but some comments don't wrap at 80 characters.
Comment #5
mr.baileysThanks, I've changed the comments so they don't exceed 80 characters, new patch attached...
Comment #6
catchLooks great.
Comment #8
lilou commentedSetting to 'needs review' - testbot was broken.
Comment #9
lilou commentedReroll now
t()is removed ingetinfo(): #500866: [META] remove t() from assert messageComment #10
nbluto commentedComment #11
nbluto commentedUpdated Head at 1400 Pacific time. Applied patch and patch application was successful. Simple tests all passed on poll module in MAMP environment php 5.2.5 with fresh copy of Drupal 7 head. Functional test of Suggested assertions:
- Poll is initially active.
- Poll is still active after cron runs when it has not reached expiry point.
- Poll is inactive after cron runs after it has reached expiry point.
also worked.
Comment #12
tommyk commentedReporting same as comment #11.
With patch from comment #9, MAMP, PHP 2.5.6, Drupal 7 HEAD.
Requirements from initial issue work great!
Comment #13
nbluto commentedComment #14
bangalos commentedSimpleTest on Patch is failing - unreliably. First time, I got 53 errors. Second time, I got 1 error. Third time I got 4 errors. Each time, the error was different.
My Environment: Linux (Fedora) - Apache - Mysql(5.0.45) - Php(5.2.4). I did a fresh install of drupalHEAD at 1500 Hrs - pacific time, installed the patch and applied.
Note: Actual functionality works! So, I was able to create a poll, populate it, see the poll get populated, expire it and see the poll get expired. - So, the functionality being patched is working but Simpletest is failing sporadically.
Comment #15
nbluto commentedUpdated Head at 1400 Pacific time. Applied patch and patch application was successful. Simple tests all passed on poll module in MAMP environment php 5.2.5 with fresh copy of Drupal 7 head. Functional test of Suggested assertions:
- Poll is initially active.
- Poll is still active after cron runs when it has not reached expiry point.
- Poll is inactive after cron runs after it has reached expiry point.
also worked.
Comment #16
cwgordon7 commentedThe closing bracket should go on its own line.
Comment #17
mr.baileysFixed coding style issue indentified in #16.
Comment #19
sun.core commentedComment #20
webchickSorry. :\
Comment #23
mr.baileysbump
Comment #27
aspilicious commentedGreen again...
Strange patch/bot issues
Comment #28
sun.core commentedSorry, but tests don't qualify as critical anymore.
Comment #29
Stevel commented#17: 295990_poll_expiration.patch queued for re-testing.
Lets see if this patch still applies and works. If so, this is ready for rtbc to me.
Comment #30
Stevel commentedStill good, rtbc after almost a year :)
Comment #31
dries commentedLooks good. Committed to CVS HEAD. Thanks.