Remove unnecessary author variables in specs
The factories creating proposals and debates automatically create an author.
This commit is contained in:
@@ -29,8 +29,7 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
scenario "Send a notification (Active voter)" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
proposal = create(:proposal)
|
||||
|
||||
voter = create(:user, :level_two)
|
||||
create(:vote, voter: voter, votable: proposal)
|
||||
@@ -41,8 +40,7 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
scenario "Send a notification (Follower)" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
proposal = create(:proposal)
|
||||
user_follower = create(:user)
|
||||
create(:follow, :followed_proposal, user: user_follower, followable: proposal)
|
||||
|
||||
@@ -52,8 +50,7 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
scenario "Send a notification (Follower and Voter)" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
proposal = create(:proposal)
|
||||
|
||||
user_voter_follower = create(:user)
|
||||
create(:follow, :followed_proposal, user: user_voter_follower, followable: proposal)
|
||||
@@ -68,8 +65,7 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
scenario "Send a notification (Blocked voter)" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
proposal = create(:proposal)
|
||||
|
||||
voter = create(:user, :level_two)
|
||||
create(:vote, voter: voter, votable: proposal)
|
||||
@@ -81,8 +77,7 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
scenario "Send a notification (Erased voter)" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
proposal = create(:proposal)
|
||||
|
||||
voter = create(:user, :level_two)
|
||||
create(:vote, voter: voter, votable: proposal)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe ReplyEmail do
|
||||
|
||||
let(:author) { create(:user) }
|
||||
let(:debate) { create(:debate, author: author) }
|
||||
let(:debate) { create(:debate) }
|
||||
let(:commenter) { create(:user, email: "email@commenter.org") }
|
||||
let(:comment) { create(:comment, commentable: debate, user: commenter) }
|
||||
let(:replier) { create(:user) }
|
||||
|
||||
Reference in New Issue
Block a user