Skip to content

Commit

Permalink
Fix invalid route in view of closed request
Browse files Browse the repository at this point in the history
Resolves #20
  • Loading branch information
mzur committed Dec 1, 2021
1 parent 2a3cf41 commit 27f4c03
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/views/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
@endif
@if (!$request->response_label || !$responseLabelExists)
<p>
<a href="{{route('show-annotation', $request->annotation_id)}}" class="btn btn-default btn-block" title="View the annotation in the annotation tool">View in annotation tool</a>
<a href="{{route('show-image-annotation', $request->annotation_id)}}" class="btn btn-default btn-block" title="View the annotation in the annotation tool">View in annotation tool</a>
</p>
@endif
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use ApiTestCase;
use Biigle\Tests\ImageAnnotationTest;
use Biigle\Tests\ImageTest;
use Biigle\Tests\LabelTest;
use Biigle\Tests\Modules\Ananas\AnnotationAssistanceRequestTest as AnanasTest;

class AnnotationAssistanceRequestControllerTest extends ApiTestCase
Expand Down Expand Up @@ -69,6 +70,24 @@ public function testShow()
$this->get("annotation-assistance-requests/{$request->id}")
->assertStatus(200)
->assertViewIs('ananas::show');

$request->closed_at = '2021-12-01';
$request->save();

$this->get("annotation-assistance-requests/{$request->id}")
->assertStatus(200);
}

public function testShowClosed()
{
$request = AnanasTest::create([
'closed_at' => '2021-12-01',
]);

$this->be($request->user);
$this->get("annotation-assistance-requests/{$request->id}")
->assertStatus(200)
->assertViewIs('ananas::show');
}

public function testIndex()
Expand Down

0 comments on commit 27f4c03

Please sign in to comment.