From 6ded8c4321e854b623411c7b36e9a45c2a8a36f4 Mon Sep 17 00:00:00 2001 From: Manasa <43354059+Manasa2850@users.noreply.github.com> Date: Sat, 6 Feb 2021 01:34:04 +0530 Subject: [PATCH] removed answered_questions and test (#9119) --- app/controllers/tag_controller.rb | 2 -- test/functional/tag_controller_test.rb | 6 ------ 2 files changed, 8 deletions(-) diff --git a/app/controllers/tag_controller.rb b/app/controllers/tag_controller.rb index 1c4fb4bf88..ac05add911 100644 --- a/app/controllers/tag_controller.rb +++ b/app/controllers/tag_controller.rb @@ -142,8 +142,6 @@ def show @questions = nodes.where('node.nid IN (?)', @qids) if @node_type == 'questions' end - @answered_questions = [] - @questions&.each { |question| @answered_questions << question if question.answers.any?(&:accepted) } # TODO: remove this upon refactor to remove answers code @wikis = nodes if @node_type == 'wiki' @wikis ||= [] @nodes = nodes if @node_type == 'maps' diff --git a/test/functional/tag_controller_test.rb b/test/functional/tag_controller_test.rb index 55af027772..1723a3c374 100644 --- a/test/functional/tag_controller_test.rb +++ b/test/functional/tag_controller_test.rb @@ -258,12 +258,6 @@ def setup assert_select '#note-graph', 0 end - test 'wildcard tag should list answered questions' do - get :show, params: { id: 'question:*' } - - assert_not_nil assigns(:answered_questions) - end - test "wildcard tag show wiki pages with author" do get :show_for_author, params: { node_type: 'wiki', id: 'awes*', author: 'Bob' } assert :success