public function testClickProposal() { $proposal = Proposal::paginate(20)->shuffle()->first(); $url_proposal = '/proposals/' . $proposal->id; //dd($proposal->id, $url_proposal); $this->visit('/proposals')->click($proposal->name); // ->see($proposal->name) // ->see($proposal->central_idea) // ->see($proposal->problem); // ->seePageIs($url_proposal); }
public function testProposalPaginates() { factory(App\Proposal::class, 50)->create(); $proposals = App\Proposal::paginate(20); $this->assertEquals(20, $proposals->count()); }
/** * Get all proposals. * * @return Collection */ public function forAll() { return Proposal::paginate(50); }