File tree Expand file tree Collapse file tree
lung_cancer_screening/questions/tests/unit/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,21 +316,6 @@ def test_creates_a_smoked_total_years_response(self):
316316 )
317317
318318
319- # Normal level - frequency
320- # Increased level - no decreased level - responses
321- # Increased level - decreased level - decreased frequency
322- # increased level - no decreased level and change true - responses
323- # increased level - decreased level and change true - decreased frequency
324- # decreased level - no other type - responses
325- # decreased level - other type - total years next type
326- # decreased level - no other type and change true - responses
327- # decreased level - other type and change true - responses
328-
329-
330-
331-
332-
333-
334319 def test_redirects_to_frequency_if_level_is_normal (self ):
335320 response = self .client .post (
336321 reverse ("questions:smoked_total_years" , kwargs = {
@@ -511,7 +496,7 @@ def test_redirects_to_next_question_forwarding_the_change_query_param(self):
511496 fetch_redirect_response = False ,
512497 )
513498
514- @ tag ( "wip" )
499+
515500 def test_redirects_to_responses_if_increased_level_and_change_true_and_no_decreased_and_another_type_exists (self ):
516501 self .tobacco_smoking_history .delete ()
517502 TobaccoSmokingHistoryFactory .create (
Original file line number Diff line number Diff line change @@ -285,6 +285,31 @@ def test_redirects_to_responses_if_change_true_and_no_change_is_selected_and_ano
285285 self .assertRedirects (response , reverse ("questions:responses" ))
286286
287287
288+ def test_redirects_to_responses_if_change_true_and_no_change_is_selected_and_another_type_exists (self ):
289+ self .tobacco_smoking_history .delete ()
290+ TobaccoSmokingHistoryFactory .create (
291+ response_set = self .response_set ,
292+ small_cigars = True ,
293+ complete = True ,
294+ normal = True ,
295+ )
296+ normal = TobaccoSmokingHistoryFactory .create (
297+ response_set = self .response_set ,
298+ cigarettes = True ,
299+ complete = True ,
300+ normal = True ,
301+ )
302+
303+ response = self .client .post (
304+ reverse ("questions:smoking_change" , kwargs = {
305+ "tobacco_type" : normal .url_type ()
306+ }),
307+ {"value" : [TobaccoSmokingHistory .Levels .NO_CHANGE ], "change" : "True" }
308+ )
309+
310+ self .assertRedirects (response , reverse ("questions:responses" ))
311+
312+
288313 def test_creates_a_smoking_change_response (self ):
289314 self .client .post (
290315 reverse ("questions:smoking_change" , kwargs = {
You can’t perform that action at this time.
0 commit comments