Skip to content

Commit b4ef08f

Browse files
author
Benjamin Wilson Friedman
authored
Modifies expected push status results (#350)
1 parent 58fb2af commit b4ef08f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/Parse/ParsePushTest.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,13 @@ public function testGettingPushStatus()
239239
// verify not pending
240240
$this->assertFalse($pushStatus->isPending());
241241

242-
// verify 'running'
242+
// verify 'running', or 'failed' on later versions of parse-server
243+
// both are acceptable
243244
$this->assertTrue(
244-
$pushStatus->isRunning(),
245-
'Push did not succeed'
245+
$pushStatus->isRunning() || $pushStatus->hasFailed(),
246+
'Push did not succeed/fail, was '.$pushStatus->getPushStatus()
246247
);
247248

248-
249-
250249
// verify # sent & failed
251250
$this->assertEquals(
252251
0,
@@ -264,8 +263,7 @@ public function testGettingPushStatus()
264263
'Hash not present'
265264
);
266265

267-
// verify we have neither failed or succeeded
268-
$this->assertFalse($pushStatus->hasFailed());
266+
// verify we have not succeeded
269267
$this->assertFalse($pushStatus->hasSucceeded());
270268
}
271269

0 commit comments

Comments
 (0)