Top Level Namespace

Defined Under Namespace

Modules: AttachmentHelpers, Capybara, CommentsHelpers, ConfirmationHelpers, Decidim, Devise, DownloadHelper, FrontendHelpers, GeocoderHelpers, MailerHelpers, RakeTaskOutputHelpers, TaskExampleGroup, TranslationHelpers Classes: AnotherDummyAuthorizationHandler, ApplicationJob, BudgetsWorkflowRandom, ComponentValidator, DummyAuthorizationHandler, DummySerializer, EtiquetteValidator, GeocodingValidator, PassthruValidator, Premailer, ProposalLengthValidator, ScopeBelongsToComponentValidator, TimeZoneValidator, TranslatablePresenceValidator, UploaderContentTypeValidator, UrlValidator, WickedPdf

Instance Method Summary collapse

Methods included from Decidim::Webpacker::Runner

included

Instance Method Details

#format_birthdate(birthdate) ⇒ Object


6
7
8
# File 'decidim-elections/lib/decidim/votings/test/factories.rb', line 6

def format_birthdate(birthdate)
  format("%04d%02d%02d", birthdate.year, birthdate.month, birthdate.day) # rubocop:disable Style/FormatStringToken
end

#generate_localized_debate_titleObject


3
4
5
# File 'decidim-debates/lib/decidim/debates/test/factories.rb', line 3

def generate_localized_debate_title
  Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> #{generate(:title)}" }
end

#generate_localized_titleObject


11
12
13
# File 'decidim-core/lib/decidim/core/test/factories.rb', line 11

def generate_localized_title
  Decidim::Faker::Localized.localized { generate(:title) }
end

#hash_for(*data) ⇒ Object


10
11
12
# File 'decidim-elections/lib/decidim/votings/test/factories.rb', line 10

def hash_for(*data)
  Digest::SHA256.hexdigest(data.join("."))
end