Display only published processes in homepage

This commit is contained in:
rgarcia
2018-05-30 13:32:20 +02:00
parent 1f16f9df6b
commit 8986cf4727
3 changed files with 11 additions and 6 deletions

View File

@@ -58,11 +58,12 @@ describe Widget::Feed do
describe "#processes" do
it "returns open processes" do
open_process1 = create(:legislation_process, :open, title: "Open process 1")
open_process2 = create(:legislation_process, :open, title: "Open process 2")
open_process3 = create(:legislation_process, :open, title: "Open process 3")
open_process4 = create(:legislation_process, :open, title: "Open process 4")
it "returns open and published processes" do
open_process1 = create(:legislation_process, :open, :published, title: "Open process 1")
open_process2 = create(:legislation_process, :open, :published, title: "Open process 2")
open_process3 = create(:legislation_process, :open, :published, title: "Open process 3")
open_process4 = create(:legislation_process, :open, :published, title: "Open process 4")
open_process5 = create(:legislation_process, :open, :not_published, title: "Open process 5")
past_process = create(:legislation_process, :past, title: "Past process")
feed = build(:widget_feed, kind: "processes")