Extract poll question option images from shared nested imageable specs to system specs
This is the only it_behaves_like "nested imageable" call where the has_many_images parameter is set to true. Previously, the shared example skipped or altered expectations based on this parameter. Now, this behavior is moved to the factory level (:future_poll_question_option). Since this is an administrative section, a related administrator is created for the user.
This commit is contained in:
@@ -4,15 +4,6 @@ describe "Images", :admin do
|
||||
let(:future_poll) { create(:poll, :future) }
|
||||
let(:current_poll) { create(:poll) }
|
||||
|
||||
it_behaves_like "nested imageable",
|
||||
"future_poll_question_option",
|
||||
"new_admin_option_image_path",
|
||||
{ option_id: "id" },
|
||||
nil,
|
||||
"Save image",
|
||||
"Image uploaded successfully",
|
||||
true
|
||||
|
||||
context "Index" do
|
||||
scenario "Option with no images" do
|
||||
option = create(:poll_question_option)
|
||||
|
||||
Reference in New Issue
Block a user