Stellen: Bewerbung per E-Mail-Adresse (0.28.3)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m39s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m45s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m50s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m51s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m52s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m55s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m33s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 10:50:31 +00:00
parent bd0808b1f8
commit 14e39bd9b3
125 changed files with 374 additions and 323 deletions

View file

@ -164,4 +164,17 @@ class StellenTest extends TestCase
$this->actingAs(User::factory()->create())->postJson('/redaktion/stellen/bilder', ['image' => UploadedFile::fake()->image('x.jpg')])->assertForbidden();
}
public function test_application_by_email_address(): void
{
$this->actingAs($this->hr)->post('/redaktion/stellen', ['title' => 'Per Mail', 'employment' => 'full', 'contract' => 'permanent', 'apply_mode' => 'email', 'publish' => 'now'])
->assertSessionHasErrors(['apply_email' => 'Bitte die E-Mail-Adresse für Bewerbungen angeben.']);
$this->post('/redaktion/stellen', ['title' => 'Per Mail', 'employment' => 'full', 'contract' => 'permanent', 'apply_mode' => 'email', 'apply_email' => 'Bewerbung@Firma.de', 'publish' => 'now'])->assertSessionHasNoErrors();
$posting = JobPosting::query()->where('title', 'Per Mail')->sole();
$this->actingAs(User::factory()->create())->get("/stellen/{$posting->id}")->assertInertia(fn (Assert $page) => $page
->where('posting.apply_mode', 'email')->where('posting.apply_email', 'bewerbung@firma.de')->where('canApply', false));
$this->post("/stellen/{$posting->id}/bewerben", ['message' => 'x'])->assertNotFound();
}
}