Sha256: 39db1b8f915e59a034038059e874b4144c86fe408d00f6fb56cd586d58713248
Contents?: true
Size: 604 Bytes
Versions: 17
Compression:
Stored size: 604 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
17 entries across 17 versions & 1 rubygems