Skip to content

Commit

Permalink
removed answered_questions and test (#9119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manasa2850 authored Feb 5, 2021
1 parent 8544730 commit 6ded8c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions app/controllers/tag_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 0 additions & 6 deletions test/functional/tag_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ded8c4

Please sign in to comment.