diff --git a/spec/features/admin/banners_spec.rb b/spec/features/admin/banners_spec.rb index c45566fd5..9c82bd882 100644 --- a/spec/features/admin/banners_spec.rb +++ b/spec/features/admin/banners_spec.rb @@ -8,45 +8,45 @@ describe "Admin banners magement" do context "Index" do before do - @banner1 = create(:banner, title: "Banner number one", - description: "This is the text of banner number one and is not active yet", - target_url: "http://www.url.com", - post_started_at: (Time.current + 4.days), - post_ended_at: (Time.current + 10.days), - background_color: "#FF0000", - font_color: "#FFFFFF") + create(:banner, title: "Banner number one", + description: "This is the text of banner number one and is not active yet", + target_url: "http://www.url.com", + post_started_at: (Time.current + 4.days), + post_ended_at: (Time.current + 10.days), + background_color: "#FF0000", + font_color: "#FFFFFF") - @banner2 = create(:banner, title: "Banner number two", - description: "This is the text of banner number two and is not longer active", - target_url: "http://www.url.com", - post_started_at: (Time.current - 10.days), - post_ended_at: (Time.current - 3.days), - background_color: "#00FF00", - font_color: "#FFFFFF") + create(:banner, title: "Banner number two", + description: "This is the text of banner number two and is not longer active", + target_url: "http://www.url.com", + post_started_at: (Time.current - 10.days), + post_ended_at: (Time.current - 3.days), + background_color: "#00FF00", + font_color: "#FFFFFF") - @banner3 = create(:banner, title: "Banner number three", - description: "This is the text of banner number three", - target_url: "http://www.url.com", - post_started_at: (Time.current - 1.day), - post_ended_at: (Time.current + 10.days), - background_color: "#0000FF", - font_color: "#FFFFFF") + create(:banner, title: "Banner number three", + description: "This is the text of banner number three", + target_url: "http://www.url.com", + post_started_at: (Time.current - 1.day), + post_ended_at: (Time.current + 10.days), + background_color: "#0000FF", + font_color: "#FFFFFF") - @banner4 = create(:banner, title: "Banner number four", - description: "This is the text of banner number four", - target_url: "http://www.url.com", - post_started_at: (DateTime.current - 10.days), - post_ended_at: (DateTime.current + 10.days), - background_color: "#FFF000", - font_color: "#FFFFFF") + create(:banner, title: "Banner number four", + description: "This is the text of banner number four", + target_url: "http://www.url.com", + post_started_at: (DateTime.current - 10.days), + post_ended_at: (DateTime.current + 10.days), + background_color: "#FFF000", + font_color: "#FFFFFF") - @banner5 = create(:banner, title: "Banner number five", - description: "This is the text of banner number five", - target_url: "http://www.url.com", - post_started_at: (DateTime.current - 10.days), - post_ended_at: (DateTime.current + 10.days), - background_color: "#FFFF00", - font_color: "#FFFFFF") + create(:banner, title: "Banner number five", + description: "This is the text of banner number five", + target_url: "http://www.url.com", + post_started_at: (DateTime.current - 10.days), + post_ended_at: (DateTime.current + 10.days), + background_color: "#FFFF00", + font_color: "#FFFFFF") end scenario "Index show active banners" do