adds setting allow_images to specs

This commit is contained in:
decabeza
2017-12-06 20:59:34 +01:00
parent cbaf1ae6c1
commit 1d6877b797
3 changed files with 26 additions and 2 deletions

View File

@@ -9,6 +9,9 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
let!(:imageable) { create(imageable_factory_name) }
before do
Setting['feature.allow_images'] = true
imageable_path_arguments&.each do |argument_name, path_to_value|
arguments.merge!("#{argument_name}": imageable.send(path_to_value))
end
@@ -16,6 +19,10 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
imageable.update(author: user) if imageable.respond_to?(:author)
end
after do
Setting['feature.allow_images'] = nil
end
describe "at #{path}" do
scenario "Should show new image link when imageable has not an associated image defined" do