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"
describe AdminHelper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe ApplicationHelper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
# Specs in this file have access to a helper object that includes
# the CommentsHelper. For example:
@@ -12,51 +12,51 @@ require 'rails_helper'
# end
RSpec.describe CommentsHelper, type: :helper do
describe '#user_level_class' do
describe "#user_level_class" do
def comment_double(as_administrator: false, as_moderator: false, official: false)
user = instance_double('User', official?: official, official_level: 'Y')
instance_double('Comment', as_administrator?: as_administrator, as_moderator?: as_moderator, user: user)
user = instance_double("User", official?: official, official_level: "Y")
instance_double("Comment", as_administrator?: as_administrator, as_moderator?: as_moderator, user: user)
end
it 'returns is-admin for comment done as administrator' do
it "returns is-admin for comment done as administrator" do
comment = comment_double(as_administrator: true)
expect(helper.user_level_class(comment)).to eq('is-admin')
expect(helper.user_level_class(comment)).to eq("is-admin")
end
it 'returns is-moderator for comment done as moderator' do
it "returns is-moderator for comment done as moderator" do
comment = comment_double(as_moderator: true)
expect(helper.user_level_class(comment)).to eq('is-moderator')
expect(helper.user_level_class(comment)).to eq("is-moderator")
end
it 'returns level followed by official level if user is official' do
it "returns level followed by official level if user is official" do
comment = comment_double(official: true)
expect(helper.user_level_class(comment)).to eq('level-Y')
expect(helper.user_level_class(comment)).to eq("level-Y")
end
it 'returns an empty class otherwise' do
it "returns an empty class otherwise" do
comment = comment_double
expect(helper.user_level_class(comment)).to eq('')
expect(helper.user_level_class(comment)).to eq("")
end
end
describe '#comment_author_class' do
it 'returns is-author if author is the commenting user' do
describe "#comment_author_class" do
it "returns is-author if author is the commenting user" do
author_id = 42
comment = instance_double('Comment', user_id: author_id)
comment = instance_double("Comment", user_id: author_id)
expect(helper.comment_author_class(comment, author_id)).to eq('is-author')
expect(helper.comment_author_class(comment, author_id)).to eq("is-author")
end
it 'returns an empty string if commenter is not the author' do
it "returns an empty string if commenter is not the author" do
author_id = 42
comment = instance_double('Comment', user_id: author_id - 1)
comment = instance_double("Comment", user_id: author_id - 1)
expect(helper.comment_author_class(comment, author_id)).to eq('')
expect(helper.comment_author_class(comment, author_id)).to eq("")
end
end
end

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe GeozonesHelper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe LocalesHelper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe ProposalsHelper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
RSpec.describe SettingsHelper, type: :helper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe TextHelper do

View File

@@ -1,8 +1,8 @@
require 'rails_helper'
require "rails_helper"
describe UsersHelper do
describe '#humanize_document_type' do
describe "#humanize_document_type" do
it "returns a humanized document type" do
expect(humanize_document_type("1")).to eq "DNI"
expect(humanize_document_type("2")).to eq "Passport"
@@ -10,14 +10,14 @@ describe UsersHelper do
end
end
describe '#deleted_commentable_text' do
describe "#deleted_commentable_text" do
it "returns the appropriate message for deleted debates" do
debate = create(:debate)
comment = create(:comment, commentable: debate)
debate.hide
expect(comment_commentable_title(comment)).to eq('<del>' + comment.commentable.title +
expect(comment_commentable_title(comment)).to eq("<del>" + comment.commentable.title +
'</del> <span class="small">(This debate has been deleted)</span>')
end
@@ -27,7 +27,7 @@ describe UsersHelper do
proposal.hide
expect(comment_commentable_title(comment)).to eq('<del>' + comment.commentable.title +
expect(comment_commentable_title(comment)).to eq("<del>" + comment.commentable.title +
'</del> <span class="small">(This proposal has been deleted)</span>')
end
@@ -37,12 +37,12 @@ describe UsersHelper do
investment.hide
expect(comment_commentable_title(comment)).to eq('<del>' + comment.commentable.title +
expect(comment_commentable_title(comment)).to eq("<del>" + comment.commentable.title +
'</del> <span class="small">(This investment project has been deleted)</span>')
end
end
describe '#comment_commentable_title' do
describe "#comment_commentable_title" do
it "returns a link to the comment" do
comment = create(:comment)
expect(comment_commentable_title(comment)).to eq link_to comment.commentable.title, comment
@@ -51,7 +51,7 @@ describe UsersHelper do
it "returns a hint if the commentable has been deleted" do
comment = create(:comment)
comment.commentable.hide
expect(comment_commentable_title(comment)).to eq('<del>' + comment.commentable.title +
expect(comment_commentable_title(comment)).to eq("<del>" + comment.commentable.title +
'</del> <span class="small">(This debate has been deleted)</span>')
end
end

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe VerificationHelper do

View File

@@ -1,4 +1,4 @@
require 'rails_helper'
require "rails_helper"
describe VotesHelper do
@@ -24,8 +24,8 @@ describe VotesHelper do
create_list(:vote, 8, votable: debate, vote_flag: true)
create_list(:vote, 3, votable: debate, vote_flag: false)
expect(votes_percentage('likes', debate)).to eq("72%")
expect(votes_percentage('dislikes', debate)).to eq("28%")
expect(votes_percentage("likes", debate)).to eq("72%")
expect(votes_percentage("dislikes", debate)).to eq("28%")
end
end