Skip to content

Commit 2ac7fde

Browse files
rosalieperdeer-wmde
authored andcommitted
Update test to pass expected parameter (#1016)
Follow up refactoring for #1009. I believe it is important for tests to reflect exactly how we expect things to work. As we updated the value of `readOnly` on the task description, I thought it would be good to update the test too. Bug: T410395
1 parent b426f83 commit 2ac7fde

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/Routes/Backend/WikiReadOnlyControllerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class WikiReadOnlyControllerTest extends TestCase {
1515
public function testItReturns404WhenWikiNotFound() {
1616
$response = $this->putJson($this->route, [
1717
'domain' => 'nonexistent.wikibase.cloud',
18-
'readOnly' => true,
18+
'readOnly' => 1,
1919
]);
2020

2121
$response->assertStatus(404)
@@ -31,7 +31,7 @@ public function testSetWikiToReadOnly() {
3131

3232
$response = $this->putJson($this->route, [
3333
'domain' => 'somewiki.wikibase.cloud',
34-
'readOnly' => true,
34+
'readOnly' => 1,
3535
]);
3636

3737
$response->assertStatus(200)
@@ -56,7 +56,7 @@ public function testDeleteSettingForReadOnlyFalse() {
5656

5757
$this->putJson($this->route, [
5858
'domain' => $wiki->domain,
59-
'readOnly' => false,
59+
'readOnly' => 0,
6060
])
6161
->assertStatus(200)
6262
->assertJson(['message' => 'Read-only setting successfully removed for wiki.']);

0 commit comments

Comments
 (0)