Removed the methods not used from nested_documentable specs (the ones that were deleted in the questions specs) and removed also the document params from questions_params (not used anymore).
This commit is contained in:
@@ -56,8 +56,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def question_params
|
def question_params
|
||||||
params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id, :valid_answers, :video_url,
|
params.require(:poll_question).permit(:poll_id, :title, :question, :proposal_id, :valid_answers, :video_url)
|
||||||
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def search_params
|
def search_params
|
||||||
|
|||||||
@@ -263,7 +263,6 @@ shared_examples "nested documentable" do |login_as_name, documentable_factory_na
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -275,7 +274,7 @@ rescue
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
def documentable_attach_new_file(documentable_factory_name, index, path, success = true)
|
def documentable_attach_new_file(_documentable_factory_name, index, path, success = true)
|
||||||
click_link "Add new document"
|
click_link "Add new document"
|
||||||
document = all(".document")[index]
|
document = all(".document")[index]
|
||||||
document_input = document.find("input[type=file]", visible: false)
|
document_input = document.find("input[type=file]", visible: false)
|
||||||
@@ -318,8 +317,3 @@ def documentable_fill_new_valid_budget_investment
|
|||||||
fill_in_ckeditor "budget_investment_description", with: "Budget investment description"
|
fill_in_ckeditor "budget_investment_description", with: "Budget investment description"
|
||||||
check :budget_investment_terms_of_service
|
check :budget_investment_terms_of_service
|
||||||
end
|
end
|
||||||
|
|
||||||
def documentable_fill_new_valid_poll_question
|
|
||||||
page.select documentable.poll.name, from: 'poll_question_poll_id'
|
|
||||||
fill_in 'poll_question_title', with: "Star Wars: Episode IV - A New Hope"
|
|
||||||
end
|
|
||||||
|
|||||||
Reference in New Issue
Block a user