Sha256: eb6dbbceba3c4122f4367826cc8b0e1177b2082791e67b1bb79226b64961f9b1
Contents?: true
Size: 608 Bytes
Versions: 21
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true shared_examples_for "conversation field with maximum length" do |field| describe "character counter" do let(:message) { "#{::Faker::Lorem.paragraph}\n#{::Faker::Lorem.paragraph}" } let(:max_length) { Decidim.config.maximum_conversation_message_length } before do allow(Decidim.config).to receive( :maximum_conversation_message_length ).and_return(max_length) end it "shows character counter" do fill_in field, with: message expect(page).to have_content("#{max_length - message.length} characters left") end end end
Version data entries
21 entries across 21 versions & 1 rubygems