@@ -14,9 +14,9 @@ class CompanyEventRequestTest extends TestCase
1414
1515 public function testItCanGetAllCompanyEvents ()
1616 {
17- $ this ->mockRequest ('company.event.index.json ' , 'vtc/258 /events ' );
17+ $ this ->mockRequest ('company.event.index.json ' , 'vtc/22 /events ' );
1818
19- $ index = $ this ->client ->company (258 )->events ()->get ();
19+ $ index = $ this ->client ->company (22 )->events ()->get ();
2020
2121 $ this ->assertInstanceOf (CompanyEventIndex::class, $ index );
2222
@@ -30,10 +30,22 @@ public function testItCanGetAllCompanyEvents()
3030
3131 public function testItCanGetASpecificCompanyEvent ()
3232 {
33- $ this ->mockRequest ('event.json ' , 'vtc/258 /events/45 ' );
33+ $ this ->mockRequest ('event.json ' , 'vtc/22 /events/45 ' );
3434
35- $ event = $ this ->client ->company (258 )->event (45 )->get ();
35+ $ event = $ this ->client ->company (22 )->event (45 )->get ();
3636
3737 $ this ->assertInstanceOf (Event::class, $ event );
3838 }
39+
40+ public function testItCanGetEventsThatACompanyIsAttending ()
41+ {
42+ $ this ->mockRequest ('company.event.attending.json ' , 'vtc/22/events/attending ' );
43+
44+ $ events = $ this ->client ->company (22 )->events ()->attending ()->get ();
45+
46+ $ this ->assertInstanceOf (Collection::class, $ events );
47+ $ this ->assertCount (1 , $ events );
48+
49+ $ this ->assertInstanceOf (Event::class, $ events ->first ());
50+ }
3951}
0 commit comments