1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Added activity text for each activity type

Ensures some sensible text is always in webhook text data.
Also aligned some notification reporting to use centralised activity
system instead of custom success events.

For #4216
This commit is contained in:
Dan Brown
2023-06-12 16:45:30 +01:00
parent af0b4fa851
commit f39938c4e3
12 changed files with 59 additions and 33 deletions

View File

@ -2,6 +2,8 @@
namespace Tests;
use BookStack\Activity\ActivityType;
class LanguageTest extends TestCase
{
protected array $langs;
@ -90,4 +92,12 @@ class LanguageTest extends TestCase
$loginReq->assertOk();
$loginReq->assertSee('Log In');
}
public function test_all_activity_types_have_activity_text()
{
foreach (ActivityType::all() as $activityType) {
$langKey = 'activities.' . $activityType;
$this->assertNotEquals($langKey, trans($langKey, [], 'en'));
}
}
}