-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #735 from TheRestartProject/RES-1984_network_coord…
…inators_group_approval RES-1984 Network Coordinator shouldn't see approval option
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use App\Group; | ||
use App\GroupTags; | ||
use App\Network; | ||
use App\Role; | ||
use App\User; | ||
use Carbon\Carbon; | ||
|
@@ -189,4 +190,33 @@ public function edit_email() | |
$group->refresh(); | ||
$this->assertEquals('[email protected]', $group->email); | ||
} | ||
|
||
public function testEditAsNetworkCoordinator() { | ||
$network = Network::factory()->create(); | ||
$coordinator = User::factory()->restarter()->create(); | ||
$network->addCoordinator($coordinator); | ||
$coordinator->refresh(); | ||
$this->actingAs($coordinator); | ||
|
||
$idgroups = $this->createGroup( | ||
'Test Group', | ||
'https://therestartproject.org', | ||
'London', | ||
'Some text.', | ||
true, | ||
false, | ||
'[email protected]' | ||
); | ||
|
||
$response = $this->get('/group/edit/' . $idgroups); | ||
$response->assertStatus(200); | ||
|
||
// Shouldn't be able to approve the group, as it has not yet been put in our network (by an admin). | ||
$this->assertVueProperties($response, [ | ||
[], | ||
[ | ||
':can-approve' => 'false', | ||
], | ||
]); | ||
} | ||
} |