Skip to content

Commit ce1d59c

Browse files
TD-3223 Showing console '404' error when removing the delegate from activity and clicking browser back button
1 parent a092b18 commit ce1d59c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

DigitalLearningSolutions.Web.Tests/Controllers/TrackingSystem/Delegates/DelegateProgressControllerTests.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
namespace DigitalLearningSolutions.Web.Tests.Controllers.TrackingSystem.Delegates
22
{
3-
using System;
4-
using System.Collections.Generic;
53
using DigitalLearningSolutions.Data.Models;
64
using DigitalLearningSolutions.Data.Models.Courses;
75
using DigitalLearningSolutions.Data.Models.CustomPrompts;
@@ -15,8 +13,11 @@
1513
using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates.DelegateProgress;
1614
using FakeItEasy;
1715
using FluentAssertions.AspNetCore.Mvc;
16+
using Microsoft.AspNetCore.Mvc;
1817
using Microsoft.Extensions.Configuration;
1918
using NUnit.Framework;
19+
using System;
20+
using System.Collections.Generic;
2021

2122
public class DelegateProgressControllerTests
2223
{
@@ -386,7 +387,11 @@ public void Delegate_removal_for_delegate_with_no_active_progress_returns_not_fo
386387
);
387388

388389
// Then
389-
result.Should().BeNotFoundResult();
390+
result.Should()
391+
.BeRedirectToActionResult()
392+
.WithActionName("StatusCode")
393+
.WithControllerName("LearningSolutions")
394+
.WithRouteValue("code", 410);
390395
}
391396

392397
[Test]

0 commit comments

Comments
 (0)