Change single quotes to double quotes

This commit is contained in:
Julian Herrero
2019-02-01 16:48:49 +01:00
parent 4a12425987
commit 31ac8b7f55
302 changed files with 6403 additions and 6403 deletions

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
feature "Admin Notifications" do
@@ -15,22 +15,22 @@ feature "Admin Notifications" do
context "Show" do
scenario "Valid Admin Notification" do
notification = create(:admin_notification, title: 'Notification title',
body: 'Notification body',
link: 'https://www.decide.madrid.es/vota',
notification = create(:admin_notification, title: "Notification title",
body: "Notification body",
link: "https://www.decide.madrid.es/vota",
segment_recipient: :all_users)
visit admin_admin_notification_path(notification)
expect(page).to have_content('Notification title')
expect(page).to have_content('Notification body')
expect(page).to have_content('https://www.decide.madrid.es/vota')
expect(page).to have_content('All users')
expect(page).to have_content("Notification title")
expect(page).to have_content("Notification body")
expect(page).to have_content("https://www.decide.madrid.es/vota")
expect(page).to have_content("All users")
end
scenario "Notification with invalid segment recipient" do
invalid_notification = create(:admin_notification)
invalid_notification.update_attribute(:segment_recipient, 'invalid_segment')
invalid_notification.update_attribute(:segment_recipient, "invalid_segment")
visit admin_admin_notification_path(invalid_notification)
@@ -40,30 +40,30 @@ feature "Admin Notifications" do
context "Index" do
scenario "Valid Admin Notifications", :with_frozen_time do
draft = create(:admin_notification, segment_recipient: :all_users, title: 'Not yet sent')
draft = create(:admin_notification, segment_recipient: :all_users, title: "Not yet sent")
sent = create(:admin_notification, :sent, segment_recipient: :administrators,
title: 'Sent one')
title: "Sent one")
visit admin_admin_notifications_path
expect(page).to have_css(".admin_notification", count: 2)
within("#admin_notification_#{draft.id}") do
expect(page).to have_content('Not yet sent')
expect(page).to have_content('All users')
expect(page).to have_content('Draft')
expect(page).to have_content("Not yet sent")
expect(page).to have_content("All users")
expect(page).to have_content("Draft")
end
within("#admin_notification_#{sent.id}") do
expect(page).to have_content('Sent one')
expect(page).to have_content('Administrators')
expect(page).to have_content("Sent one")
expect(page).to have_content("Administrators")
expect(page).to have_content(I18n.l(Date.current))
end
end
scenario "Notifications with invalid segment recipient" do
invalid_notification = create(:admin_notification)
invalid_notification.update_attribute(:segment_recipient, 'invalid_segment')
invalid_notification.update_attribute(:segment_recipient, "invalid_segment")
visit admin_admin_notifications_path
@@ -75,10 +75,10 @@ feature "Admin Notifications" do
visit admin_admin_notifications_path
click_link "New notification"
fill_in_admin_notification_form(segment_recipient: 'Proposal authors',
title: 'This is a title',
body: 'This is a body',
link: 'http://www.dummylink.dev')
fill_in_admin_notification_form(segment_recipient: "Proposal authors",
title: "This is a title",
body: "This is a body",
link: "http://www.dummylink.dev")
click_button "Create notification"
@@ -99,10 +99,10 @@ feature "Admin Notifications" do
end
fill_in_admin_notification_form(segment_recipient: 'All users',
title: 'Other title',
body: 'Other body',
link: '')
fill_in_admin_notification_form(segment_recipient: "All users",
title: "Other title",
body: "Other body",
link: "")
click_button "Update notification"
@@ -173,7 +173,7 @@ feature "Admin Notifications" do
end
end
scenario 'Errors on create' do
scenario "Errors on create" do
visit new_admin_admin_notification_path
click_button "Create notification"
@@ -219,7 +219,7 @@ feature "Admin Notifications" do
scenario "Admin notification with invalid segment recipient cannot be sent", :js do
invalid_notification = create(:admin_notification)
invalid_notification.update_attribute(:segment_recipient, 'invalid_segment')
invalid_notification.update_attribute(:segment_recipient, "invalid_segment")
visit admin_admin_notification_path(invalid_notification)
expect(page).not_to have_link("Send")