Welcome to mirror list, hosted at ThFree Co, Russian Federation.

saved_reply_spec.rb « users « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 50138dba478d85bd8d1776f2c7a2e5aa06359afd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Users::SavedReply do
  let_it_be(:saved_reply) { create(:saved_reply) }

  describe 'validations' do
    it { is_expected.to validate_presence_of(:user_id) }
    it { is_expected.to validate_presence_of(:name) }
    it { is_expected.to validate_presence_of(:content) }
    it { is_expected.to validate_uniqueness_of(:name).scoped_to([:user_id]) }
    it { is_expected.to validate_length_of(:name).is_at_most(255) }
    it { is_expected.to validate_length_of(:content).is_at_most(10000) }
  end
end