-
Notifications
You must be signed in to change notification settings - Fork 263
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 #10433 from nextcloud/fix/mailto/bcc-recipients
fix(mailto): Handle BCC recipients only
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
use PHPUnit\Framework\MockObject\MockObject; | ||
use Psr\Container\ContainerInterface; | ||
use Psr\Log\LoggerInterface; | ||
use function urlencode; | ||
|
||
class PageControllerTest extends TestCase { | ||
/** @var string */ | ||
|
@@ -380,6 +381,17 @@ public function testComposeWithCc() { | |
$this->assertEquals($expected, $response); | ||
} | ||
|
||
public function testComposeBcc() { | ||
$bcc = '[email protected]'; | ||
$uri = "mailto:?bcc=$bcc"; | ||
|
||
$expected = new RedirectResponse('?bcc=' . urlencode($bcc)); | ||
|
||
$response = $this->controller->compose($uri); | ||
|
||
$this->assertEquals($expected, $response); | ||
} | ||
|
||
public function testComposeWithBcc() { | ||
$address = '[email protected]'; | ||
$bcc = '[email protected]'; | ||
|