Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules. Personally I prefer no empty lines around blocks, clases, etc... as recommended by the Ruby style guide [1], and they're the default values in rubocop, so those are the settings I'm applying. The exception is the `private` access modifier, since we were leaving empty lines around it most of the time. That's the default rubocop rule as well. Personally I don't have a strong preference about this one. [1] https://rubystyle.guide/#empty-lines-around-bodies
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe "Proposal Notifications" do
|
||||
|
||||
scenario "Send a notification" do
|
||||
author = create(:user, :with_proposal)
|
||||
|
||||
@@ -156,7 +155,6 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
context "Permissions" do
|
||||
|
||||
scenario "Link to send the message" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
@@ -188,11 +186,9 @@ describe "Proposal Notifications" do
|
||||
expect(page).to have_current_path(root_path)
|
||||
expect(page).to have_content("You do not have permission to carry out the action")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "In-app notifications from the proposal's author" do
|
||||
|
||||
scenario "Voters should receive a notification", :js do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
@@ -342,7 +338,6 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
context "Group notifications" do
|
||||
|
||||
before do
|
||||
Setting[:proposal_notification_minimum_interval_in_days] = 0
|
||||
end
|
||||
@@ -375,7 +370,6 @@ describe "Proposal Notifications" do
|
||||
expect(page).to have_content "There is one new notification on #{proposal.title}", count: 3
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
scenario "Error messages" do
|
||||
@@ -391,7 +385,6 @@ describe "Proposal Notifications" do
|
||||
end
|
||||
|
||||
context "Limits" do
|
||||
|
||||
scenario "Cannot send more than one notification within established interval" do
|
||||
author = create(:user)
|
||||
proposal = create(:proposal, author: author)
|
||||
@@ -439,7 +432,5 @@ describe "Proposal Notifications" do
|
||||
|
||||
travel_back
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user