Use scenario instead of it in feature specs

This commit is contained in:
rgarcia
2018-06-12 13:41:43 +02:00
committed by Javi Martín
parent 6fa7562181
commit 431c313487

View File

@@ -3,7 +3,8 @@ require "rails_helper"
feature "Polls" do
context "Public index" do
it "Budget polls should not be listed" do
scenario "Budget polls should not be listed" do
poll = create(:poll)
budget_poll = create(:poll, budget: create(:budget))
@@ -12,10 +13,12 @@ feature "Polls" do
expect(page).to have_content(poll.name)
expect(page).not_to have_content(budget_poll.name)
end
end
context "Admin index" do
it "Budget polls should not appear in the list" do
scenario "Budget polls should not appear in the list" do
login_as(create(:administrator).user)
poll = create(:poll)