Skip to content

Commit dca9bc1

Browse files
committed
Testing
1 parent 7a25ea9 commit dca9bc1

12 files changed

+31
-30
lines changed

app/Bus/Commands/Incident/ReportIncidentCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ final class ReportIncidentCommand
103103
'component_id' => 'int|required_with:component_status',
104104
'component_status' => 'int|min:1|max:4|required_with:component_id',
105105
'notify' => 'bool',
106-
'stickied' => 'bool',
106+
'stickied' => 'bool',
107107
'incident_date' => 'string',
108108
'template' => 'string',
109109
];

app/Bus/Commands/Incident/UpdateIncidentCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ final class UpdateIncidentCommand
112112
'component_id' => 'int',
113113
'component_status' => 'int|min:1|max:4|required_with:component_id',
114114
'notify' => 'bool',
115-
'stickied' => 'bool',
115+
'stickied' => 'bool',
116116
'template' => 'string',
117117
];
118118

app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ public function __construct(DateFactory $dates, Bridge $twig)
6565
public function handle(ReportIncidentCommand $command)
6666
{
6767
$data = [
68-
'name' => $command->name,
69-
'status' => $command->status,
70-
'visible' => $command->visible,
68+
'name' => $command->name,
69+
'status' => $command->status,
70+
'visible' => $command->visible,
7171
'stickied' => $command->stickied,
7272
];
7373

app/Bus/Handlers/Commands/Incident/ReportMaintenanceCommandHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function handle(ReportMaintenanceCommand $command)
5454
'scheduled_at' => $scheduledAt,
5555
'status' => 0,
5656
'visible' => 1,
57-
'stickied' => false,
57+
'stickied' => false,
5858
]);
5959

6060
$maintenanceEvent->notify = (bool) $command->notify;

app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function filter(UpdateIncidentCommand $command)
107107
'status' => $command->status,
108108
'message' => $command->message,
109109
'visible' => $command->visible,
110-
'stickied' => $command->stickied,
110+
'stickied' => $command->stickied,
111111
'component_id' => $command->component_id,
112112
'component_status' => $command->component_status,
113113
'notify' => $command->notify,

app/Console/Commands/DemoSeederCommand.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected function seedIncidents()
205205
'component_id' => 0,
206206
'scheduled_at' => null,
207207
'visible' => 1,
208-
'stickied' => false,
208+
'stickied' => false,
209209
],
210210
[
211211
'name' => 'Awesome',
@@ -214,7 +214,7 @@ protected function seedIncidents()
214214
'component_id' => 0,
215215
'scheduled_at' => null,
216216
'visible' => 1,
217-
'stickied' => false,
217+
'stickied' => false,
218218
],
219219
[
220220
'name' => 'Monitoring the fix',
@@ -223,7 +223,7 @@ protected function seedIncidents()
223223
'component_id' => 0,
224224
'scheduled_at' => null,
225225
'visible' => 1,
226-
'stickied' => false,
226+
'stickied' => false,
227227
],
228228
[
229229
'name' => 'Update',
@@ -232,7 +232,7 @@ protected function seedIncidents()
232232
'component_id' => 0,
233233
'scheduled_at' => null,
234234
'visible' => 1,
235-
'stickied' => false,
235+
'stickied' => false,
236236
],
237237
[
238238
'name' => 'Test Incident',
@@ -241,7 +241,7 @@ protected function seedIncidents()
241241
'component_id' => 0,
242242
'scheduled_at' => null,
243243
'visible' => 1,
244-
'stickied' => false,
244+
'stickied' => false,
245245
],
246246
[
247247
'name' => 'Investigating the API',
@@ -250,7 +250,7 @@ protected function seedIncidents()
250250
'component_id' => 1,
251251
'scheduled_at' => null,
252252
'visible' => 1,
253-
'stickied' => false,
253+
'stickied' => false,
254254
],
255255
[
256256
'name' => 'Stickied to the top',
@@ -259,7 +259,7 @@ protected function seedIncidents()
259259
'component_id' => 1,
260260
'scheduled_at' => null,
261261
'visible' => 1,
262-
'stickied' => true,
262+
'stickied' => true,
263263
],
264264
];
265265

app/Foundation/Providers/ModuleServiceProvider.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ class ModuleServiceProvider extends ServiceProvider
4545
'status' => 20000,
4646
'components' => 30000,
4747
'metrics' => 40000,
48-
'scheduled' => 50000,
49-
'timeline' => 60000,
48+
'stickied' => 50000,
49+
'scheduled' => 60000,
50+
'timeline' => 70000,
5051
],
5152
];
5253

app/Models/Incident.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Incident extends Model implements HasPresenter
3232
*/
3333
protected $casts = [
3434
'visible' => 'int',
35-
'stickied' => 'int',
35+
'stickied' => 'int',
3636
'scheduled_at' => 'date',
3737
'deleted_at' => 'date',
3838
];
@@ -64,7 +64,7 @@ class Incident extends Model implements HasPresenter
6464
'name' => 'required',
6565
'status' => 'required|int',
6666
'visible' => 'required|bool',
67-
'stickied' => 'bool',
67+
'stickied' => 'bool',
6868
'message' => 'required',
6969
];
7070

database/factories/ModelFactory.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040

4141
$factory->define(Incident::class, function ($faker) {
4242
return [
43-
'name' => $faker->sentence(),
44-
'message' => $faker->paragraph(),
45-
'status' => random_int(1, 4),
46-
'visible' => 1,
43+
'name' => $faker->sentence(),
44+
'message' => $faker->paragraph(),
45+
'status' => random_int(1, 4),
46+
'visible' => 1,
4747
'stickied' => false,
4848
];
4949
});

tests/Api/IncidentTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public function testPostIncident()
5555
$this->beUser();
5656

5757
$this->post('/api/v1/incidents', [
58-
'name' => 'Foo',
59-
'message' => 'Lorem ipsum dolor sit amet',
60-
'status' => 1,
61-
'visible' => 1,
58+
'name' => 'Foo',
59+
'message' => 'Lorem ipsum dolor sit amet',
60+
'status' => 1,
61+
'visible' => 1,
6262
'stickied' => false,
6363
]);
6464
$this->seeJson(['name' => 'Foo']);
@@ -78,7 +78,7 @@ public function testPostIncidentWithComponentStatus()
7878
'component_id' => $component->id,
7979
'component_status' => 1,
8080
'visible' => 1,
81-
'stickied' => false,
81+
'stickied' => false,
8282
]);
8383
$this->seeJson(['name' => 'Foo']);
8484
$this->assertResponseOk();
@@ -93,7 +93,7 @@ public function testCreateIncidentWithTemplate()
9393
'name' => 'Foo',
9494
'status' => 1,
9595
'visible' => 1,
96-
'stickied' => false,
96+
'stickied' => false,
9797
'template' => $template->slug,
9898
'vars' => [
9999
'name' => 'Foo',

tests/Bus/Commands/Incident/ReportIncidentCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function getObjectAndParams()
3636
'component_id' => 1,
3737
'component_status' => 1,
3838
'notify' => false,
39-
'stickied' => false,
39+
'stickied' => false,
4040
'incident_date' => null,
4141
'template' => null,
4242
'template_vars' => null,

tests/Bus/Commands/Incident/UpdateIncidentCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function getObjectAndParams()
3838
'component_id' => 1,
3939
'component_status' => 1,
4040
'notify' => false,
41-
'stickied' => false,
41+
'stickied' => false,
4242
'incident_date' => null,
4343
'template' => null,
4444
'template_vars' => null,

0 commit comments

Comments
 (0)