DEV: Set a limit for ApiKey#description (#21502)

This commit is contained in:
Loïc Guitaut
2023-05-15 06:12:25 +02:00
committed by GitHub
parent f160f073b0
commit 9f283eb836
2 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@ RSpec.describe ApiKey do
it { is_expected.to belong_to :user }
it { is_expected.to belong_to :created_by }
it { is_expected.to validate_length_of(:description).is_at_most(255) }
it "generates a key when saving" do
api_key = ApiKey.new