Ejemplo n.º 1
0
 public function testFetchesOneConference()
 {
     $conferenceId = Conference::first()->id;
     $response = $this->call('GET', 'api/conferences/' . $conferenceId);
     $data = $this->parseJson($response);
     $this->assertIsJson($data);
     $this->assertInternalType('object', $data->data);
 }
 /**
  * @test
  */
 public function empty_dates_are_treated_as_null()
 {
     $input = ['title' => 'AwesomeConf 2015', 'description' => 'The best conference in the world!', 'url' => 'http://example.com', 'starts_at' => '', 'ends_at' => '', 'cfp_starts_at' => '', 'cfp_ends_at' => ''];
     $form = CreateConferenceForm::fillOut($input, Factory::create('user'));
     $form->complete();
     $conference = Conference::first();
     $this->assertNull($conference->starts_at);
     $this->assertNull($conference->ends_at);
     $this->assertNull($conference->cfp_starts_at);
     $this->assertNull($conference->cfp_ends_at);
 }