@@ -280,18 +280,15 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
280
280
$ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
281
281
}
282
282
283
- public function testOrganizationActionRendersValidModulesOnly ()
283
+ public function testOrganizationActionRendersUnregisteredModulesOnly ()
284
284
{
285
285
$ this ->authenticatedAs (new User ());
286
286
287
- $ validModule = $ this ->validModule ();
288
-
289
- $ nonModule = $ this ->nonModule ();
287
+ $ unregisteredModule = $ this ->validModule ();
290
288
$ registeredModule = $ this ->registeredModule ();
291
289
292
290
$ repositories = [
293
- $ validModule ,
294
- $ nonModule ,
291
+ $ unregisteredModule ,
295
292
$ registeredModule ,
296
293
$ this ->forkedModule (),
297
294
$ this ->moduleWithoutPushPermissions (),
@@ -318,15 +315,8 @@ public function testOrganizationActionRendersValidModulesOnly()
318
315
;
319
316
320
317
$ moduleService
321
- ->expects ($ this ->any ())
318
+ ->expects ($ this ->never ())
322
319
->method ('isModule ' )
323
- ->willReturnCallback (function ($ repository ) use ($ nonModule ) {
324
- if ($ repository !== $ nonModule ) {
325
- return true ;
326
- }
327
-
328
- return false ;
329
- })
330
320
;
331
321
332
322
$ moduleMapper = $ this ->getMockBuilder (Mapper \Module::class)
@@ -382,8 +372,8 @@ public function testOrganizationActionRendersValidModulesOnly()
382
372
$ viewVariable = $ viewModel ->getVariable ('repositories ' );
383
373
384
374
$ this ->assertInternalType ('array ' , $ viewVariable );
385
- $ this ->assertCount (2 , $ viewVariable );
386
- $ this ->assertSame ($ validModule , $ viewVariable [0 ]);
375
+ $ this ->assertCount (1 , $ viewVariable );
376
+ $ this ->assertSame ($ unregisteredModule , $ viewVariable [0 ]);
387
377
}
388
378
389
379
public function testAddActionRedirectsIfNotAuthenticated ()
0 commit comments