Skip to content

Commit f68bd59

Browse files
committed
TD-4880 added unit test case corrections for the delegate test controller.
1 parent 7eef8fa commit f68bd59

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
public class CourseDelegatesControllerTests
2424
{
2525
private const int UserCentreId = 3;
26+
private const int SelfAssessmentId = 1;
2627
private ActivityDelegatesController controller = null!;
2728
private ICourseDelegatesDownloadFileService courseDelegatesDownloadFileService = null!;
2829
private ICourseDelegatesService courseDelegatesService = null!;
@@ -122,8 +123,10 @@ public void CourseDelegates_Index_returns_Not_Found_when_service_returns_null()
122123
), 0)
123124
);
124125

126+
A.CallTo(() => selfAssessmentDelegatesService.GetSelfAssessmentCategoryId(1)).Returns(1);
127+
125128
// When
126-
var result = controller.Index(2);
129+
var result = controller.Index(2,1);
127130

128131
// Then
129132
result.Should().BeNotFoundResult();
@@ -155,6 +158,7 @@ public void Index_should_default_to_Active_filter()
155158
{
156159
// Given
157160
const int customisationId = 2;
161+
const int selfAssessmentId = 2;
158162
var searchString = string.Empty;
159163
var sortBy = "SearchableName";
160164
var sortDirection = "Ascending";
@@ -207,7 +211,7 @@ public void Index_should_default_to_Active_filter()
207211
);
208212

209213
// When
210-
var result = courseDelegatesController.Index(customisationId);
214+
var result = courseDelegatesController.Index(customisationId, selfAssessmentId);
211215

212216
// Then
213217
using (new AssertionScope())

0 commit comments

Comments
 (0)