File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tests/Unit/Http/Middleware/Api Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function testWithNoIPRestrictions()
2626 */
2727 public function testWithValidIP ()
2828 {
29- $ model = factory (ApiKey::class)->make (['allowed_ips ' => ' [" 127.0.0.1"] ' ]);
29+ $ model = factory (ApiKey::class)->make (['allowed_ips ' => [ ' 127.0.0.1 ' ] ]);
3030 $ this ->setRequestAttribute ('api_key ' , $ model );
3131
3232 $ this ->request ->shouldReceive ('ip ' )->withNoArgs ()->once ()->andReturn ('127.0.0.1 ' );
@@ -39,7 +39,7 @@ public function testWithValidIP()
3939 */
4040 public function testValidIPAgainstCIDRRange ()
4141 {
42- $ model = factory (ApiKey::class)->make (['allowed_ips ' => ' [" 192.168.1.1/28"] ' ]);
42+ $ model = factory (ApiKey::class)->make (['allowed_ips ' => [ ' 192.168.1.1/28 ' ] ]);
4343 $ this ->setRequestAttribute ('api_key ' , $ model );
4444
4545 $ this ->request ->shouldReceive ('ip ' )->withNoArgs ()->once ()->andReturn ('192.168.1.15 ' );
@@ -55,7 +55,7 @@ public function testWithInvalidIP()
5555 {
5656 $ this ->expectException (AccessDeniedHttpException::class);
5757
58- $ model = factory (ApiKey::class)->make (['allowed_ips ' => ' [" 127.0.0.1"] ' ]);
58+ $ model = factory (ApiKey::class)->make (['allowed_ips ' => [ ' 127.0.0.1 ' ] ]);
5959 $ this ->setRequestAttribute ('api_key ' , $ model );
6060
6161 $ this ->request ->shouldReceive ('ip ' )->withNoArgs ()->twice ()->andReturn ('127.0.0.2 ' );
You can’t perform that action at this time.
0 commit comments