示例#1
0
 /**
  * @test
  */
 public function it_does_need_an_url()
 {
     $users = factory(Screeenly\User::class, 10)->create()->each(function ($u) {
         $u->apikeys()->save(factory(Screeenly\ApiKey::class)->make());
     });
     $key = Screeenly\ApiKey::first();
     $arguments = ['key' => $key->key];
     $this->post('/api/v1/fullsize', $arguments)->seeJson(["message" => "Validation Error: The url field is required."]);
 }
示例#2
0
 /**
  * @test
  */
 public function it_does_need_an_url()
 {
     $users = factory(Screeenly\User::class, 10)->create()->each(function ($u) {
         $u->apikeys()->save(factory(Screeenly\ApiKey::class)->make());
     });
     $key = Screeenly\ApiKey::first();
     $arguments = ['key' => $key->key];
     $this->post('/api/v2/fullsize', $arguments)->seeJson(["detail" => "The url field is required."]);
     $this->assertResponseStatus(422);
 }