Skip to content

Commit

Permalink
Merge pull request #10 from cloudflare/COM-45
Browse files Browse the repository at this point in the history
COM-45 :: Bugfix active status in Page Rules
  • Loading branch information
IcyApril authored Sep 20, 2017
2 parents 48db633 + 635a299 commit f38b1c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Endpoints/PageRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function createPageRule(
];

if ($active !== null) {
$options['active'] = $active == true ? 'active' : 'disabled';
$options['status'] = $active == true ? 'active' : 'disabled';
}

if ($priority !== null) {
Expand Down Expand Up @@ -117,7 +117,7 @@ public function updatePageRule(
}

if ($active !== null) {
$options['active'] = $active == true ? 'active' : 'disabled';
$options['status'] = $active == true ? 'active' : 'disabled';
}

if ($priority !== null) {
Expand Down
8 changes: 4 additions & 4 deletions tests/Endpoints/PageRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public function testCreatePageRule()
$this->equalTo([
'targets' => $target->getArray(),
'actions' => $action->getArray(),
'active' => 'active',
'priority' => '1'
'status' => 'active',
'priority' => 1
])
);

Expand Down Expand Up @@ -217,8 +217,8 @@ public function testUpdatePageRule()
$this->equalTo([
'targets' => $target->getArray(),
'actions' => $action->getArray(),
'active' => 'active',
'priority' => '1'
'status' => 'active',
'priority' => 1
])
);

Expand Down

0 comments on commit f38b1c6

Please sign in to comment.