@@ -21,7 +21,7 @@ public void Index_should_render_view()
2121 A . CallTo ( ( ) => courseContentService . GetProgressId ( CandidateId , CustomisationId ) ) . Returns ( 10 ) ;
2222
2323 // When
24- var result = controller . Index ( CustomisationId ) ;
24+ var result = controller . Index ( CustomisationId , progressID ) ;
2525
2626 // Then
2727 var expectedModel = new InitialMenuViewModel ( expectedCourseContent ) ;
@@ -44,7 +44,7 @@ public void Index_should_redirect_to_section_page_if_one_section_in_course()
4444 A . CallTo ( ( ) => courseContentService . GetOrCreateProgressId ( CandidateId , customisationId , CentreId ) ) . Returns ( 10 ) ;
4545
4646 // When
47- var result = controller . Index ( customisationId ) ;
47+ var result = controller . Index ( customisationId , progressID ) ;
4848
4949 // Then
5050 result . Should ( )
@@ -74,7 +74,7 @@ public void Index_should_not_redirect_to_section_page_if_more_than_one_section_i
7474 A . CallTo ( ( ) => courseContentService . GetProgressId ( CandidateId , customisationId ) ) . Returns ( 10 ) ;
7575
7676 // When
77- var result = controller . Index ( customisationId ) ;
77+ var result = controller . Index ( customisationId , progressID ) ;
7878
7979 // Then
8080 var expectedModel = new InitialMenuViewModel ( expectedCourseContent ) ;
@@ -91,7 +91,7 @@ public void Index_should_return_404_if_unknown_course()
9191 . Returns ( 3 ) ;
9292
9393 // When
94- var result = controller . Index ( CustomisationId ) ;
94+ var result = controller . Index ( CustomisationId , progressID ) ;
9595
9696 // Then
9797 result . Should ( )
@@ -112,7 +112,7 @@ public void Index_should_return_404_if_unable_to_enrol()
112112 . Returns ( null ) ;
113113
114114 // When
115- var result = controller . Index ( CustomisationId ) ;
115+ var result = controller . Index ( CustomisationId , progressID ) ;
116116
117117 // Then
118118 result . Should ( )
@@ -129,7 +129,7 @@ public void Index_always_calls_get_course_content()
129129 const int customisationId = 1 ;
130130
131131 // When
132- controller . Index ( 1 ) ;
132+ controller . Index ( 1 , 2 ) ;
133133
134134 // Then
135135 A . CallTo ( ( ) => courseContentService . GetCourseContent ( CandidateId , customisationId ) ) . MustHaveHappened ( ) ;
@@ -147,7 +147,7 @@ public void Index_valid_customisation_id_should_update_login_and_duration()
147147 A . CallTo ( ( ) => courseContentService . GetProgressId ( CandidateId , CustomisationId ) ) . Returns ( progressId ) ;
148148
149149 // When
150- controller . Index ( CustomisationId ) ;
150+ controller . Index ( CustomisationId , progressID ) ;
151151
152152 // Then
153153 A . CallTo ( ( ) => sessionService . StartOrUpdateDelegateSession ( CandidateId , CustomisationId , A < ISession > . _ ) ) . MustHaveHappened ( ) ;
@@ -160,7 +160,7 @@ public void Index_invalid_customisation_id_should_not_insert_new_progress()
160160 A . CallTo ( ( ) => courseContentService . GetCourseContent ( CandidateId , CustomisationId ) ) . Returns ( null ) ;
161161
162162 // When
163- controller . Index ( CustomisationId ) ;
163+ controller . Index ( CustomisationId , progressID ) ;
164164
165165 // Then
166166 A . CallTo ( ( ) => courseContentService . GetOrCreateProgressId ( A < int > . _ , A < int > . _ , A < int > . _ ) ) . MustNotHaveHappened ( ) ;
@@ -173,7 +173,7 @@ public void Index_invalid_customisation_id_should_not_update_login_and_duration(
173173 A . CallTo ( ( ) => courseContentService . GetCourseContent ( CandidateId , CustomisationId ) ) . Returns ( null ) ;
174174
175175 // When
176- controller . Index ( CustomisationId ) ;
176+ controller . Index ( CustomisationId , progressID ) ;
177177
178178 // Then
179179 A . CallTo ( ( ) => courseContentService . UpdateProgress ( A < int > . _ ) ) . MustNotHaveHappened ( ) ;
@@ -186,7 +186,7 @@ public void Index_failing_to_insert_progress_should_not_update_progress()
186186 A . CallTo ( ( ) => courseContentService . GetOrCreateProgressId ( CandidateId , CustomisationId , CentreId ) ) . Returns ( null ) ;
187187
188188 // When
189- controller . Index ( CustomisationId ) ;
189+ controller . Index ( CustomisationId , progressID ) ;
190190
191191 // Then
192192 A . CallTo ( ( ) => courseContentService . UpdateProgress ( A < int > . _ ) ) . MustNotHaveHappened ( ) ;
@@ -203,7 +203,7 @@ public void Index_valid_customisationId_should_StartOrUpdate_course_sessions()
203203 A . CallTo ( ( ) => courseContentService . GetProgressId ( CandidateId , CustomisationId ) ) . Returns ( 1 ) ;
204204
205205 // When
206- controller . Index ( CustomisationId ) ;
206+ controller . Index ( CustomisationId , progressID ) ;
207207
208208 // Then
209209 A . CallTo ( ( ) => sessionService . StartOrUpdateDelegateSession ( CandidateId , CustomisationId , httpContextSession ) ) . MustHaveHappenedOnceExactly ( ) ;
@@ -221,7 +221,7 @@ public void Index_invalid_customisationId_should_not_StartOrUpdate_course_sessio
221221 A . CallTo ( ( ) => courseContentService . GetOrCreateProgressId ( CandidateId , CustomisationId , CentreId ) ) . Returns ( 1 ) ;
222222
223223 // When
224- controller . Index ( CustomisationId ) ;
224+ controller . Index ( CustomisationId , progressID ) ;
225225
226226 // Then
227227 A . CallTo ( ( ) => sessionService . StartOrUpdateDelegateSession ( A < int > . _ , A < int > . _ , A < ISession > . _ ) ) . MustNotHaveHappened ( ) ;
@@ -236,7 +236,7 @@ public void Index_unable_to_enrol_should_not_StartOrUpdate_course_sessions()
236236 A . CallTo ( ( ) => courseContentService . GetOrCreateProgressId ( CandidateId , CustomisationId , CentreId ) ) . Returns ( null ) ;
237237
238238 // When
239- controller . Index ( CustomisationId ) ;
239+ controller . Index ( CustomisationId , progressID ) ;
240240
241241 // Then
242242 A . CallTo ( ( ) => sessionService . StartOrUpdateDelegateSession ( A < int > . _ , A < int > . _ , A < ISession > . _ ) ) . MustNotHaveHappened ( ) ;
@@ -298,7 +298,7 @@ public void Index_not_detects_id_manipulation_self_register_true()
298298 A . CallTo ( ( ) => courseService . GetSelfRegister ( CustomisationId ) ) . Returns ( true ) ;
299299
300300 // When
301- var result = controller . Index ( CustomisationId ) ;
301+ var result = controller . Index ( CustomisationId , progressID ) ;
302302
303303 // Then
304304 result . Should ( )
0 commit comments