Changes suggested in PR:

* Delete all things related to banner images and styles (in code)
* Add a new test to check that the banner is showing correctly
* Update the specs accordingly to match the changes

Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style)
Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
This commit is contained in:
iagirre
2018-01-24 16:23:12 +01:00
committed by Angel Perez
parent 5d1b06a3cb
commit 82cb8d4c52
8 changed files with 75 additions and 58 deletions

View File

@@ -738,11 +738,11 @@ FactoryBot.define do
factory :banner do
sequence(:title) { |n| "Banner title #{n}" }
sequence(:description) { |n| "This is the text of Banner #{n}" }
style {["banner-style-one", "banner-style-two", "banner-style-three"].sample}
image {["banner.banner-img-one", "banner.banner-img-two", "banner.banner-img-three"].sample}
target_url {["/proposals", "/debates" ].sample}
post_started_at { Time.current - 7.days }
post_ended_at { Time.current + 7.days }
background_color '#FF0000'
font_color '#FFFFFF'
end
factory :proposal_notification do