Use describe on feature tests
The `type: :feature` is automatically detected by RSpec because these tests are inside the `spec/features` folder. Using `feature` re-adds a `type: :feature` to these files, which will result in a conflict when we upgrade to Rails 5.1's system tests. Because of this change, we also need to change `background` to `before` or else these tests will fail.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
require "rails_helper"
|
||||
include ActionView::Helpers::DateHelper
|
||||
|
||||
feature "Commenting topics from proposals" do
|
||||
describe "Commenting topics from proposals" do
|
||||
let(:user) { create :user }
|
||||
let(:proposal) { create :proposal }
|
||||
|
||||
@@ -166,7 +166,7 @@ feature "Commenting topics from proposals" do
|
||||
expect(page).to have_css(".comment", count: 2)
|
||||
end
|
||||
|
||||
feature "Not logged user" do
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
community = proposal.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -336,7 +336,7 @@ feature "Commenting topics from proposals" do
|
||||
end
|
||||
end
|
||||
|
||||
feature "Moderators" do
|
||||
describe "Moderators" do
|
||||
scenario "can create comment as a moderator", :js do
|
||||
community = proposal.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -398,7 +398,7 @@ feature "Commenting topics from proposals" do
|
||||
end
|
||||
end
|
||||
|
||||
feature "Administrators" do
|
||||
describe "Administrators" do
|
||||
scenario "can create comment as an administrator", :js do
|
||||
community = proposal.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -460,9 +460,8 @@ feature "Commenting topics from proposals" do
|
||||
end
|
||||
end
|
||||
|
||||
feature "Voting comments" do
|
||||
|
||||
background do
|
||||
describe "Voting comments" do
|
||||
before do
|
||||
@manuela = create(:user, verified_at: Time.current)
|
||||
@pablo = create(:user)
|
||||
@proposal = create(:proposal)
|
||||
@@ -555,7 +554,7 @@ feature "Commenting topics from proposals" do
|
||||
|
||||
end
|
||||
|
||||
feature "Commenting topics from budget investments" do
|
||||
describe "Commenting topics from budget investments" do
|
||||
let(:user) { create :user }
|
||||
let(:investment) { create :budget_investment }
|
||||
|
||||
@@ -720,7 +719,7 @@ feature "Commenting topics from budget investments" do
|
||||
expect(page).to have_css(".comment", count: 2)
|
||||
end
|
||||
|
||||
feature "Not logged user" do
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
community = investment.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -890,7 +889,7 @@ feature "Commenting topics from budget investments" do
|
||||
end
|
||||
end
|
||||
|
||||
feature "Moderators" do
|
||||
describe "Moderators" do
|
||||
scenario "can create comment as a moderator", :js do
|
||||
community = investment.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -952,7 +951,7 @@ feature "Commenting topics from budget investments" do
|
||||
end
|
||||
end
|
||||
|
||||
feature "Administrators" do
|
||||
describe "Administrators" do
|
||||
scenario "can create comment as an administrator", :js do
|
||||
community = investment.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -1014,9 +1013,8 @@ feature "Commenting topics from budget investments" do
|
||||
end
|
||||
end
|
||||
|
||||
feature "Voting comments" do
|
||||
|
||||
background do
|
||||
describe "Voting comments" do
|
||||
before do
|
||||
@manuela = create(:user, verified_at: Time.current)
|
||||
@pablo = create(:user)
|
||||
@investment = create(:budget_investment)
|
||||
|
||||
Reference in New Issue
Block a user