File tree Expand file tree Collapse file tree 2 files changed +6
-20
lines changed
tests/fixtures/NovaTestGeneratorTest Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ public function testCreate(): void
4545
4646 public function testCreateNoAuth(): void
4747 {
48- $data = $this->getJsonFixture('create_{{ $snake_entity } } _request.json');
49-
50- $response = $this->json('post', '/nova-api/{{ $url_path } } ', $data);
48+ $response = $this->json('post', '/nova-api/{{ $url_path } } ');
5149
5250@if ($shouldUseStatus )
5351 $response->assertStatus(Response::HTTP_UNAUTHORIZED);
@@ -105,9 +103,7 @@ public function testUpdateNotExists(): void
105103
106104 public function testUpdateNoAuth(): void
107105 {
108- $data = $this->getJsonFixture('update_{{ $snake_entity } } _request.json');
109-
110- $response = $this->json('put', '/nova-api/{{ $url_path } } /1', $data);
106+ $response = $this->json('put', '/nova-api/{{ $url_path } } /1');
111107
112108@if ($shouldUseStatus )
113109 $response->assertStatus(Response::HTTP_UNAUTHORIZED);
@@ -224,10 +220,7 @@ public function testGetNoAuth(): void
224220
225221 public function testSearchUnauthorized(): void
226222 {
227- $response = $this->json('get', '/nova-api/{{ $url_path } } ', [
228- 'orderBy' => 'id',
229- 'orderByDirection' => 'asc'
230- ]);
223+ $response = $this->json('get', '/nova-api/{{ $url_path } } ');
231224
232225@if ($shouldUseStatus )
233226 $response->assertStatus(Response::HTTP_UNAUTHORIZED);
Original file line number Diff line number Diff line change @@ -39,9 +39,7 @@ public function testCreate(): void
3939
4040 public function testCreateNoAuth (): void
4141 {
42- $ data = $ this ->getJsonFixture ('create_some_post_request.json ' );
43-
44- $ response = $ this ->json ('post ' , '/nova-api/some-post-resources ' , $ data );
42+ $ response = $ this ->json ('post ' , '/nova-api/some-post-resources ' );
4543
4644 $ response ->assertUnauthorized ();
4745
@@ -83,9 +81,7 @@ public function testUpdateNotExists(): void
8381
8482 public function testUpdateNoAuth (): void
8583 {
86- $ data = $ this ->getJsonFixture ('update_some_post_request.json ' );
87-
88- $ response = $ this ->json ('put ' , '/nova-api/some-post-resources/1 ' , $ data );
84+ $ response = $ this ->json ('put ' , '/nova-api/some-post-resources/1 ' );
8985
9086 $ response ->assertUnauthorized ();
9187 }
@@ -166,10 +162,7 @@ public function testGetNoAuth(): void
166162
167163 public function testSearchUnauthorized (): void
168164 {
169- $ response = $ this ->json ('get ' , '/nova-api/some-post-resources ' , [
170- 'orderBy ' => 'id ' ,
171- 'orderByDirection ' => 'asc '
172- ]);
165+ $ response = $ this ->json ('get ' , '/nova-api/some-post-resources ' );
173166
174167 $ response ->assertUnauthorized ();
175168 }
You can’t perform that action at this time.
0 commit comments